In my form there are two button( button1 and button2 ).
I want when i click button1 the form size become 100x200 and
when button2 is clicked i want the form size 250x500.
I am new to C# so plz give me the full code of [form1.cs] for this program.
How to resize a form in runtime with button?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Ashley Argile97 reputationPosted Oct 8, 2008, 11:46 PM EDT
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
this.Size = new Size(100, 200);
}
private void button2_Click(object sender, EventArgs e)
{
this.Size = new Size(250, 500);
}
}
Regards
Ashley