I've got a skinned for with no standard title bar, so I want to be able to drag the label which is the custom titlebar and it will move the form just like the standard title bar does, here it is in vb6
VB Code:
Private Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hWnd As Long, _ ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Declare Sub ReleaseCapture Lib "User32" () Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Const WM_NCLBUTTONDOWN = &HA1 Const HTCAPTION = 2 If Button = 1 Then ReleaseCapture SendMessage Me.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0& End If End Sub![]()




Reply With Quote