Moving a form without the title bar 
Author Message
 Moving a form without the title bar

i've got a form with no titlebar (caption="", controlbar=no)
Took me awhile to get the coordinates and formulas worked out, but i can
move a form by clicking on the form and dragging it.

What i need to do is add an outline when dragging, such as is found on most
of microsoft's dockable toolbars. is there a way to make the body of the
form respond to the mouse exactly as the title bar does? thanks in advance.



Wed, 18 Apr 2001 03:00:00 GMT  
 Moving a form without the title bar
Try the following code:

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 Function ReleaseCapture Lib "user32" () As Long
Private Const WM_SYSCOMMAND = &H112

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, x As Single,
y As Single)
    Call ReleaseCapture
    Call SendMessage(Me.hwnd, WM_SYSCOMMAND, &HF012, 0)
End Sub

Hope this helps.

-Sai

Quote:

>i've got a form with no titlebar (caption="", controlbar=no)
>Took me awhile to get the coordinates and formulas worked out, but i can
>move a form by clicking on the form and dragging it.

>What i need to do is add an outline when dragging, such as is found on most
>of microsoft's dockable toolbars. is there a way to make the body of the
>form respond to the mouse exactly as the title bar does? thanks in advance.



Wed, 18 Apr 2001 03:00:00 GMT  
 Moving a form without the title bar
YES! Thank you Sai!


Thu, 19 Apr 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Moving a Form Without a title bar [vb3]

2. Moving a form without a title bar

3. drag move title without title bar?

4. form move without title bar

5. Moving a FORM in VB4 without using the TITLE Bar

6. Move Form without Title Bar

7. Moving without title bar?

8. How to move window without title bar?

9. Move window without title bar

10. Moving a window without a title bar

11. Moving a form without a title in win95

12. Moving a Form with no title bar

 

 
Powered by phpBB® Forum Software