|
-
October 19th, 2001, 10:09 PM
#1
how to manually drag the form???
how can i manually drag the form??? i disabled my title bar therefore i must manually set my dragging codes. can anyone help me???
-
October 20th, 2001, 01:01 PM
#2
Re: how to manually drag the form???
Here is a sample to drag forms without title bars
Start a new project. Add a module
Paste this code in the appropriate spots.
Run the program and Click and hold the mouse button and move it around the screen.
'
' paste this code in the Module
'
Declare Sub ReleaseCapture Lib "user32" ()
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (byval hwnd as Long, byval wMsg as Long, byval wParam as Integer, byval lParam as Long) as Long
public Sub FormDrag(TheForm as Form)
ReleaseCapture
Call SendMessage(TheForm.hwnd, &HA1, 2, 0&)
End Sub
'
' Paste this code into the from
'
private Sub Form_MouseDown(Button as Integer, Shift as Integer, X as Single, Y as Single)
FormDrag me
End Sub
John G
-
September 22nd, 2003, 09:30 PM
#3
That code works great.
Now that we are on the topic, is there some way to show the form in taskbar with certain title, while the form does not have the titlebar? (because it has no caption)... it is a paradox I guess.
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
|