Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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 DamithSL 295
1 OriginalGriff 285
2 Sergey Alexandrovich Kryukov 157
3 Afzaal Ahmad Zeeshan 154
4 Peter Leow 115
0 OriginalGriff 7,510
1 DamithSL 5,494
2 Sergey Alexandrovich Kryukov 4,954
3 Maciej Los 4,936
4 Kornfeld Eliyahu Peter 4,514


Advertise | Privacy | Mobile
Web02 | 2.8.141223.1 | Last Updated 20 Nov 2012
Copyright © CodeProject, 1999-2014
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