vb 鼠标拖动image
Dim bx, by As LongDim Startmove As Boolean
Private Sub image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then bx = X: by = Y: Startmove = True
End Sub
Private Sub image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Startmove Then
Image1.Move Image1.Left + X - bx, Image1.Top + Y - by
End If
End Sub
Private Sub image1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then Startmove = False
End Sub 沙发没人坐我自己坐
页:
[1]