Article ID: 154006
Article Last Modified on 7/1/2004
Option Explicit
Private Declare Sub ReleaseCapture Lib "User" ()
Private Declare Function SendMessage Lib "User" (ByVal hWnd As _
Integer, ByVal wMsg As Integer, ByVal wParam As Integer, _
lParam As Any) As Long
Private Const WM_SYSCOMMAND = &H112
Private Const MOUSE_MOVE = &HF012
' Enter the line below as one line of code
Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
Dim lReturn As Long
Call ReleaseCapture
lReturn = SendMessage(Form1.hWnd, WM_SYSCOMMAND, MOUSE_MOVE, 0)
End Sub
103062 How to Move Controls at Run Time By Using Drag and Drop
113904 How to Move a Control Across a Form at Run Time
79884 How to Move Controls Between Forms in VB for Windows
Additional query words: kbVBp400 kbVBp600 kbVBp kbdsd kbDSupport kbintluk KBSDKWIN32 KBAPI
Keywords: kbhowto KB154006