vb6.0读取鼠标坐标
需要判断出鼠标位置,并且点击时在那个地方加载一张图片有什么简单的代码没?最好别动api,时间紧迫--...
需要判断出鼠标位置,并且点击时在那个地方加载一张图片有什么简单的代码没?最好别动api,时间紧迫- -
展开
展开全部
Private Sub Form_Load()
Me.AutoRedraw = True
Picture1.AutoRedraw = True
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'x\y 就是鼠标的坐标啊
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
'Picture1 里读一张图片
Me.PaintPicture Picture1.Picture, X, Y, Picture1.Width, Picture1.Height
End Sub
Me.AutoRedraw = True
Picture1.AutoRedraw = True
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'x\y 就是鼠标的坐标啊
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
'Picture1 里读一张图片
Me.PaintPicture Picture1.Picture, X, Y, Picture1.Width, Picture1.Height
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询