Click here to Skip to main content
15,905,563 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
How to set the size of a window form in c#?
Posted
Comments
Aniket Yadav 14-Mar-12 7:58am    
do you want to set in runtime?
Sergey Alexandrovich Kryukov 15-Mar-12 0:15am    
What happens to your MSDN?
--SA

Refer this CP article, Windows Forms User Settings in C#[^]

Also refer to Form.Size Property[^]
 
Share this answer
 
v2
In a Winforms window you can set the height and width in the properties window, under size property. You could also set this in code using
C#
this.Height = yourHeight;
this.Width = yourWidth;
in the code behind;
In WPF forms you can set this in the XAML in the window declaration using Width and Height properties, or using code as above for Winforms
 
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