I want to increase my form size
so i created a Checkbox to decide Increase/Decrease the size
here is the code
private void ExtandedColorBox(object sender, EventArgs e)
{
CheckBox CheckBox1 = new CheckBox();
CheckBox1.Checked = true;
if (CheckBox1.Checked == true)
{
this.MaximumSize = new Size(300, 303); //--> this=Form
this.Size = new Size(300, 303);
}
if (CheckBox1.Checked == false)
{
this.MaximumSize = new Size(300, 280);
this.Size = new Size(300, 280);
}
}
when i check the get increased but when i check again it's does'nt get decreased
because the status of the Checkbox never getting changed to False
Please help

New Topic/Question
Reply



MultiQuote





|