Click here to Skip to main content
15,881,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am working on a window form.in my winform i have groupboxes and textboxes .when i run my application and maximize the winform window how can i get my groupboxes and textboxes resized according to the size of window
Posted

See this, it may help:
http://stackoverflow.com/questions/1603526/how-can-i-make-a-control-resize-itself-when-the-window-is-maximized[^]

If above link doesn't help:
Some times you may have to write code to set the size proportional to window size.
Get your window size and accordingly figure out some formula to resize the grid.
 
Share this answer
 
The normal way is to set the Anchor properties relative to all four sides, however, that may not give the expected results if the controls become too small.
 
Share this answer
 
Comments
Kenneth Haugland 4-Sep-12 12:14pm    
Can be fixed by setting the minimum size, or?
Dr.Walt Fair, PE 4-Sep-12 12:31pm    
Possibly. In some cases I've run into, the minimum size is too big. What would really be needed is to shrink the fonts, etc. as well as the edges of the controls. That's not so easy and I don't have a good solution.

If setting a minimum size works for your case, that's certainly easy!
hello,Code sent to my mailbox, I help you solve!pan@baletu.com
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900