rmmarsh
asked on
How allow window to be resized?
I have a C# .NET desktop program that is about 4 years old. When I designed it, I made it fixed size (860 x 720)... now, I would like to allow the user to maximize it to fit the size of their screen, keeping the aspect ratio and all controls positioned exactly where they are now in relation to each other.
How do I do this? And what is the "standard" maximum window size?
How do I do this? And what is the "standard" maximum window size?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There are a couple of things to bear in mind here:
Have you set the maximum size for the window? If so then set those values to 0.
Have you set the border style to fixed? If so then set ot tp sizeable.
I agree with the above comment regarding the statndard maximum window size, and the aspect ratio
To keep your items that must move with any of the margins, anchor them with those margins, bearing in mind that if you anchor to all the margins, the item will grow and shrink as the window is resized.
If you use the anchor option be sure to set the minimum size of the window so that your items do not move on top of one another when the window is made smaller.
Regards
Mike
Have you set the maximum size for the window? If so then set those values to 0.
Have you set the border style to fixed? If so then set ot tp sizeable.
I agree with the above comment regarding the statndard maximum window size, and the aspect ratio
To keep your items that must move with any of the margins, anchor them with those margins, bearing in mind that if you anchor to all the margins, the item will grow and shrink as the window is resized.
If you use the anchor option be sure to set the minimum size of the window so that your items do not move on top of one another when the window is made smaller.
Regards
Mike
After setting proper anchor/dock properties on your controls, you can keep the form itself at that aspect ratio:
http://www.vcskicks.com/maintain-aspect-ratio.php
http://www.vcskicks.com/maintain-aspect-ratio.php
ASKER