in various case i have seen that when we run apps in various pc with different monitor size then win form behave differently. sometime the form get bigger and as a result few control on that form will not visible.so please tell me how to design win apps in such a way that what ever the monitor size would be the form size and control position will behave same way in all the pc monitor size.please guide me.thanks.
Asked
Active
Viewed 1,173 times
0

Cody Gray - on strike
- 239,200
- 50
- 490
- 574

Thomas
- 33,544
- 126
- 357
- 626
-
Possible duplicates: http://stackoverflow.com/questions/4590488/ensuring-that-application-is-independent-of-users-screen-resolution, http://stackoverflow.com/questions/4248637/how-to-auto-resize-and-adjust-form-controls-with-change-in-resolution, http://stackoverflow.com/questions/2493402/dynamically-scaled-uis-with-vb-net-winforms, http://stackoverflow.com/questions/2069694/windows-forms-resolution-problem, http://stackoverflow.com/questions/638685/how-do-i-resize-controls-on-a-form-to-fit-different-resolutions – Cody Gray - on strike Jan 04 '11 at 07:45
-
http://stackoverflow.com/search?q=c%23+form+controls+aspect+ratio – KMån Jan 04 '11 at 07:54
-
@KMan: I don't think this is necessarily an aspect ratio issue. One might prefer that the controls scale to fit the form's current size, rather than locking in a particular aspect ratio. – Cody Gray - on strike Jan 04 '11 at 08:00
2 Answers
1
Use Anchor Property of the Control. Default Anchor is Top,Left. If you want Control Width to increase with Form, Set it to Top, Left, Right. Adjust the Anchors according to your requirement.

Protean
- 116
- 7
1
You have many options in terms of layout of controls. Anchoring is the most common way, but you should also investigate docking and table layout panels.

MattDavey
- 8,897
- 3
- 31
- 54