vb 实现鼠标拖动图片的代码
1个回答
展开全部
Public X0 As Single
Public Y0 As Single
Private Sub Form_Click()
Image1.Left = X0
Image1.Top = Y0
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
X0 = X
Y0 = Y
End Sub
Public Y0 As Single
Private Sub Form_Click()
Image1.Left = X0
Image1.Top = Y0
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
X0 = X
Y0 = Y
End Sub
追问
谢谢,这个我已经解决了,你的代码还需仔细完善
追答
?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询