jamesalvin49
New member
- Joined
- Mar 22, 2007
- Messages
- 4
- Programming Experience
- 1-3
Hi!Can we move a form which is borderless.i am using VB.net 2005can any one help
Private Sub Me_MouseDown(ByVal sender As Object, _
ByVal e As MouseEventArgs) _
Handles MyBase.MouseDown
mouseOffset = New Point(-e.X, -e.Y)
End Sub
Private Sub Me_MouseMove(ByVal sender As Object, _
ByVal e As MouseEventArgs) _
Handles MyBase.MouseMove
If e.Button = MouseButtons.Left Then
Dim mousePos As Point = Control.MousePosition
mousePos.Offset(mouseOffset.X, mouseOffset.Y)
Location = mousePos
End If
End Sub