Private Declare Function ReleaseCapture Lib "user32" () As Long Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As LongConst WM_SYSCOMMAND = &H112 Const SC_MOVE = &HF012Private Sub tbToolBar_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) If Button = 1 Then ReleaseCapture SendMessage tbToolBar.hwnd, WM_SYSCOMMAND, SC_MOVE, 0 End If End Sub
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As LongConst WM_SYSCOMMAND = &H112
Const SC_MOVE = &HF012Private Sub tbToolBar_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 1 Then
ReleaseCapture
SendMessage tbToolBar.hwnd, WM_SYSCOMMAND, SC_MOVE, 0
End If
End Sub
http://www.applevb.com/sourcecode/docktoolbar.zip
http://www.applevb.com/sourcecode/dockbarapp.zip