Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Dragging two forms together

Posted on 2000-02-17
3
Medium Priority
?
151 Views
Last Modified: 2010-05-02
I have a program with four forms, not MDI. What I want is to be able to drag the main form and at the same time drag the others along, so it acts like one form. Kind of like winamp. I know someone posted a neat trick using a timer, but the problem is that the other forms don't move until you've finished dragging the main form.

Source code would be greatly appreciated!
0
Comment
Question by:rukiman
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
mcrider earned 80 total points
ID: 2530584
To do that, you have to create a hook to subclass your window with the with the WM_MOVE message...

Check out these two Microsoft Articles:

HOWTO: Build a Windows Message Handler with AddressOf in VB
http://support.microsoft.com/support/kb/articles/Q170/5/70.asp?LNG=ENG&SA=MSDN 
This article demonstrates WM_RBUTTONUP (windows right mouse button up message), but can be adapted to use the WM_MOVE message...


HOWTO: Use APIs to Check, Enable, or Disable Full Window Drag
http://support.microsoft.com/support/kb/articles/Q185/6/37.ASP?LNG=ENG&SA=MSDN 
   


Cheers!



0
 
LVL 14

Expert Comment

by:mcrider
ID: 2533800
Thanks for the points! Glad I could help.


Cheers!
0
 

Author Comment

by:rukiman
ID: 2534265
cheers
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question