Solved

Dragging two forms together

Posted on 2000-02-17
3
135 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 20 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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now