Link to home
Start Free TrialLog in
Avatar of GuryTraub
GuryTraub

asked on

Resizing windows in MDI

I have an MDI application
I want to give the user only the option to maximize or minimize
How do I do it.

How Do I size the window in a generic way, So it'll be in middle no matter what is the resolution ?
Avatar of kausalyadevi
kausalyadevi

You can use the Properties of the forms like Screen.width, Me. Width to give the form in the middle.


There is no property to restrict the resize event. But u can restrict in an indirect way like giving the default height,Width of the form in resizee event.
I don't think that's a really good answer.
If you click on the "form" then look at the "Properties" you can select the "Border Style" which allows you to choose whether the user will be able to resize the window or not.

"Max Button", "Min Button", and "Start Up Position" are the other controls you seem to want.
Avatar of GuryTraub

ASKER

Not very good solutions.
The both of them
I guess neither of us could figure out what you actually wanted.
Here is a quote from MSDN on the subject
but it may not suit you either.
================

Setting Child Form Size and Position
When an MDI child form has a sizable border (BorderStyle = 2), Microsoft Windows determines its initial height, width, and position when it is loaded. The initial size and position of a child form with a sizable border depends on the size of the MDI form, not on the size of the child form at design time. When an MDI child form's border is not sizable (BorderStyle = 0, 1, or 3), it is loaded using its design-time Height and Width properties.

If you set AutoShowChildren to False, you can change the position of the MDI child after you load it, but before you make it visible.

For More Information   See "AutoShowChildren Property and "Show Method" in the Language Reference
==================================
ASKER CERTIFIED SOLUTION
Avatar of jackg
jackg

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial