Click here to Skip to main content
11,496,146 members (506 online)
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.
See more: C#
where do you insert code to auto resize a winform using c sharp?

[Edit: Based on response to Solution 2, I have updated the question tags.]
Posted 20-Nov-12 7:38am
ah954243
Edited 20-Nov-12 9:08am
v2
Comments
Gregory.Gadow at 20-Nov-12 12:50pm
   
Your title says "web form" but your question is about "winform." These are different, which is it?
ProgramFOX at 20-Nov-12 12:51pm
   
In the title you write "web form" and in your question you write "winform".
Can you change the title or the question using the "Improve question" button?
If you don't do that, people can't know what you mean.
Tim Corey at 20-Nov-12 13:19pm
   
Once you clarify which you mean (winform vs webform), can you please clarify what exactly you are trying to do? Are you looking to resize the form or the controls on a form? Are you looking to resize inside a parent window or is it a stand-alone form? What do you want it to resize to (size)?
Sergey Alexandrovich Kryukov at 20-Nov-12 13:33pm
   
Web or Windows Form?!
--SA
Short answer is: nowhere. If you design the layout properly, the form will resize smoothly by itself, using the code which is already written. In Web forms, you should learn CSS and how to make fluid design. In System.Windows.Forms you should not use any absolute positioning at all, but should use System.Windows.Forms.Control.Dock with System.Windows.Forms.Control.Padding.

—SA
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 10,401
1 OriginalGriff 8,910
2 Sascha Lefèvre 3,899
3 Maciej Los 3,422
4 Richard Deeming 2,600


Advertise | Privacy | Mobile
Web02 | 2.8.150520.1 | Last Updated 20 Nov 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100