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 ?
LVL 1
GuryTraubAsked:
Who is Participating?
 
jackgConnect With a Mentor Commented:
I guess that the best way way is to select the 'centre owner' value so that no matter the dimension the screen is always centred.
0
 
kausalyadeviCommented:
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.
0
 
3rsrichardCommented:
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.
0
 
GuryTraubAuthor Commented:
Not very good solutions.
The both of them
0
 
3rsrichardCommented:
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
==================================
0
All Courses

From novice to tech pro — start learning today.