Private isDown As Boolean
Private Sub move_MouseDown(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles move.MouseDown
If e.Button = Windows.Forms.MouseButtons.Left Then
isDown = True
End If
End Sub
Private Sub move_MouseMove(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles move.MouseMove
If isDown = True Then
Panel1.Location = New Point(MousePosition.X , MousePosition.Y)
Panel1.BringToFront()
End If
End Sub
Private Sub move_MouseUp(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles move.MouseUp
isDown = False
End Sub
No hay comentarios:
Publicar un comentario