Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim mousedown1 As Boolean = false
- Dim a, b As Integer
- Private Sub Panel1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseDown
- mousedown1 = True
- End Sub
- Private Sub Panel1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseUp
- mousedown1 = False
- End Sub
- Private Sub Panel1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseMove
- If mousedown1 = True Then
- Me.Left = Cursor.Position.X - a
- Me.Top = Cursor.Position.Y - b
- End If
- End Sub
- Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
- a = Cursor.Position.X - a
- b = Cursor.Position.Y - b
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement