Solved

Need to move SDI parent when MDI form is moved

Posted on 2004-09-25
2
228 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

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

760 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

20 Experts available now in Live!

Get 1:1 Help Now