Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Need to move SDI parent when MDI form is moved

Posted on 2004-09-25
2
Medium Priority
?
245 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 1000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Suggested Courses

610 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