Resizing mdi child forms so they don't maximize when another form is maximized

Posted on 2003-03-11
Medium Priority
Last Modified: 2008-02-01
My application can have several child forms open at a time. One of the problems is that if one of the forms is maximized all the child forms maximize.

I've partially gotten around this by testing to see if screen.activeform.name = me.name. I use a static variable to save a value of what state the form was in the last time resize is called.

The problem is that resize is not called when you click on the minimize button when the form doesn't have focus. So, the pre-minimize value is still saved.

What can I do to capture all events related to the form resize, or just keep the forms the same size when another form is maximized.

Nick Hurd
Question by:nickhurd
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
LVL 22

Accepted Solution

rspahitz earned 300 total points
ID: 8114798
When one MDI child is maximized, the rest become maximized automatically.  From what I can see, the only way to prevent this is to disable the maximize button of the child form (MaxButton = False.)

If you need to allow the user to "maximize" this, you can either add your own titlebar-style control bar or add a feature to the MDI menu that will maximize the form by simply resizing it to the maximum area of the MDI form (although it won't auto-resize as the MDI for resizes.)

    FormN.Move 0, 0, MDIForm1.ScaleWidth, MDIForm1.ScaleHeight

Expert Comment

ID: 8900274
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
LVL 49

Expert Comment

ID: 9097108
nickhurd, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Save as PAQ -- No Refund.

DanRollins -- EE database cleanup volunteer

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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…
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 …
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month9 days, 1 hour left to enroll

764 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