|
-
Sep 22nd, 2000, 07:49 AM
#1
Thread Starter
Lively Member
Can someone help me, by explaining to me how to remove the TitleBar, Controlbox, Min and Max Buttons from a form but still have the form moveable, or at least having the Title bar invisible, but still being able to move the form dragging any part of it.
Cheers
The problem with designing something completely foolproof is to underestimate the ingenuity of a complete fool. - Douglas Adams
I know the human being and fish can coexist peacefully. - GWB
I think we agree, the past is over. - GWB
-
Sep 22nd, 2000, 07:51 AM
#2
_______
Code:
'
'set the form's controlbox property = false
'set the form caption = ""
'Make A Titleless Form Moveable With Mouse Drag
'Add the following code to the declarations section of a form
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
'Add this code to the form's MouseMove procedure:
'
Dim lngReturnValue As Long
If Button = 1 Then
Call ReleaseCapture
lngReturnValue = SendMessage(Form1.hWnd, WM_NCLBUTTONDOWN, _
HTCAPTION, 0&)
End If
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 22nd, 2000, 08:00 AM
#3
_______
<?>
stupid smilies..
HTCAPTION, 0&)
is HTCAPTION, 0& [closing bracket] )
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 22nd, 2000, 08:46 AM
#4
Thread Starter
Lively Member
Thanks very much HSJ, it works brilliantly.
The problem with designing something completely foolproof is to underestimate the ingenuity of a complete fool. - Douglas Adams
I know the human being and fish can coexist peacefully. - GWB
I think we agree, the past is over. - GWB
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|