Click here to Skip to main content
12,559,025 members (45,149 online)
Rate this:
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 6:38am
Updated 20-Nov-12 8:08am
Gregory.Gadow 20-Nov-12 12:50pm
Your title says "web form" but your question is about "winform." These are different, which is it?
ProgramFOX 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 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 20-Nov-12 13:33pm
Web or Windows Form?!
Rate this: bad
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.


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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.161026.1 | Last Updated 20 Nov 2012
Copyright © CodeProject, 1999-2016
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