Article ID: 173773
Article Last Modified on 7/1/2004
Visual Basic 5.0 and Visual Basic 6.0
Caption = ""
ControlBox = False
Visual Basic 4.0
Caption = ""
ControlBox = False
MaxButton = False
MinButton = False
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" ()
Const WM_NCLBUTTONDOWN = &HA1
Const HTCAPTION = 2
Private Sub Form_Load()
Command1.Caption = "Exit"
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
Dim lngReturnValue As Long
If Button = 1 Then
Call ReleaseCapture
lngReturnValue = SendMessage(Form1.hWnd, WM_NCLBUTTONDOWN, _
HTCAPTION, 0&)
End If
End Sub
Private Sub Command1_Click()
End
End Sub
114593 : How To Move a Form that Has No Titlebar or Caption
Keywords: kbhowto kbapi kbnetwork KB173773