Solved

Dragging two forms together

Posted on 2000-02-17
3
138 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB 6.0 printer how to align 6 62
MS Date Picker 64 bit 32 bit issue 12 55
which modules are active in VB6 project? 6 14
Error with a code discussed on this page 5 16
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

831 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