' Visual Basic
Private Sub Form1_MouseDown(ByVal sender As Object, _
ByVal e As MouseEventArgs) Handles MyBase.MouseDown
Dim xOffset As Integer
Dim yOffset As Integer
If e.Button = MouseButtons.Left Then
xOffset = -e.X - SystemInformation.FrameBorderSize.Width
yOffset = -e.Y - SystemInformation.CaptionHeight - _
SystemInformation.FrameBorderSize.Height
mouseOffset = New Point(xOffset, yOffset)
isMouseDown = True
End If
End Sub
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.