Torna al Thread
Const SWP_FRAMECHANGED = &H20
Const HWND_TOP = 0
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_DRAWFRAME = SWP_FRAMECHANGED
Const SWP_HIDEWINDOW = &H80
Const SWP_NOCOPYBITS = &H100
Const SWP_NOOWNERZORDER = &H200
Const SWP_NOREDRAW = &H8
Const SWP_NOREPOSITION = SWP_NOOWNERZORDER
Const SWP_NOZORDER = &H4
Const SWP_SHOWWINDOW = &H4
Dim NewLocation As Point
Dim X, Y As Integer
Private Sub lblHeader_mousemove(ByVal sender As System.Object, ByVal e As MouseEventArgs) Handles lblHeader.MouseMove
MeMouseMove(e)
End Sub
Private Sub lblHeader_mousedown(ByVal sender As System.Object, ByVal e As MouseEventArgs) Handles lblHeader.MouseDown
MeMouseDown(e)
End Sub
Private Sub MeMouseMove(ByVal e As MouseEventArgs)
If e.Button = Windows.Forms.MouseButtons.Left Then
NewLocation = Control.MousePosition
NewLocation.X -= X
NewLocation.Y -= Y
Me.Location = NewLocation
End If
End Sub
Private Sub MeMouseDown(ByVal e As MouseEventArgs)
X = Control.MousePosition.X - Me.Location.X
Y = Control.MousePosition.Y - Me.Location.Y
End Sub