Solved

Need to move SDI parent when MDI form is moved

Posted on 2004-09-25
2
229 Views
Last Modified: 2008-03-03
My application is SDI, but I call a MDI form with a MDI child.

If I move the MDI form, the SDI form (main application) doesn't move.  Is there a way to move the forms together?

Thanks.
0
Comment
Question by:halfondj
2 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 250 total points
ID: 12152899
You can subclass the MDI form and trap the WM_MOVING message.  This message fires AS the form is moving, giving you a RECT structure with the forms current position.  You can use this information to move the SDI form as the MDI form moves.

The technique would be very similar to the solution I posted here:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21141584.html

You probably would not want the SWP_NOREDRAW flag in the SetWindowPos call if your SDI form is visible though.

Regards,

Idle_Mind
0
 

Author Comment

by:halfondj
ID: 12153587
Thanks for your reply.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…

920 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

11 Experts available now in Live!

Get 1:1 Help Now