Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (pnlCaption is the same as a Panel1.)
- This is to drag a borderless form
- Private Sub pnlCaption_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pnlCaption.MouseDown
- If e.Button = Windows.Forms.MouseButtons.Left And Me.WindowState <> FormWindowState.Maximized Then
- MoveForm()
- End If
- End Sub
- Private Sub MoveForm()
- ReleaseCapture()
- SendMessage(Me.Handle, WM_NCLBUTTONDOWN, HTCAPTION, 0)
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement