Solved

Need to move SDI parent when MDI form is moved

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

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 67
bit defender blocks good applications 2 101
I need help using System.Web.HttpUtility.HtmlEncode in my VB.Net application 3 94
MsgBox 4 68
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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

839 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