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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.