Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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
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

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
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…
Suggested Courses

569 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