include("../include.php"); writeHeader("Move a form with no title bar", "Programming » Visual Basic 6 » Visual Basic 6 Code » Forms » ");?>
Public Declare Sub ReleaseCapture Lib "user32" () Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" _ (ByVal hWnd As Long, _ ByVal wMsg As Long, _ ByVal wParam As Long, _ lParam As Any) As Long Public Const WM_NCLBUTTONDOWN = &HA1 Public Const HTCAPTION = 2 'This goes in the MouseDown event of your control that you want to ' move the form with Dim nRet As Long If Button = vbLeftButton Then ReleaseCapture nRet = SendMessage(Me.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&) End If