vb问题....请高手救救

来源:百度知道 编辑:UC知道 时间:2024/05/18 01:33:21
在状态栏窗格中怎样显示鼠标的(X,Y)坐标

'添加状态栏控件StatusBar1
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(1).Text = "X:" & X / Screen.TwipsPerPixelX & " Y:" & Y / Screen.TwipsPerPixelY
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(1).Text = "(" & x & "," & y & ")"
End Sub