Click here to Skip to main content
15,074,377 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when a form is load its size should be similar to the computer window size. I try with this code
C#
this.Size =MaximumSize;

But my effort didn't success.
Posted
Updated 15-Aug-11 18:32pm
v2

Hi,
You can maximize the form in this way:

this.WindowState = FormWindowState.Maximized;


Hope this helps.
   
Comments
Jeremy Shin Woo 16-Aug-11 0:36am
   
Thanx
Use the WindowState property of the form:
C#
Form1.ActiveForm.WindowState = FormWindowState.Maximized;
   
Comments
Jeremy Shin Woo 16-Aug-11 0:36am
   
Thanx

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