Solved

Need to move SDI parent when MDI form is moved

Posted on 2004-09-25
2
238 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

733 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