Im using a borderless form with a label as a title bar with 3 command buttons (Min,Max,Close) I was wondering how to move the form when the user clicks on the titlebar and drags it
Printable View
Im using a borderless form with a label as a title bar with 3 command buttons (Min,Max,Close) I was wondering how to move the form when the user clicks on the titlebar and drags it
lblTitleBar = name of the label being used as titlebar
:)VB Code:
Private Sub lblTitleBar_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim lngReturnValue As Long If Button = 1 Then Call ReleaseCapture lngReturnValue = SendMessage(Me.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&) End If End Sub
I got it to work! Thanks alot!