Question: I have a form with a simple calculator with the size 245 x 359.

I currently have a show/hide button for scientific functions.

I want to be able to click a button and have it show the scientific functions.

With the button size 300 x 400.

![enter image description here](https://i.stack.imgur.com/hU954.png)

Answer: 
In your button click event you can do the following:

```
this.Size = new Size(300,400);

```
In the designer, just make these buttons, but then drag it's size to how you want it before the specific button is pressed.
Add a event handler for the button you want, then do this:

```
bool buttonPressed = false;

private void onChangeSizeButton_pressed(EventArgs e, object o)
{
   if (buttonPressed)
   {
      this.Size = new Size(this.Size.Width, DEFAULT HEIGHT HERE);
      buttonPressed = false;
   }
   else
   {
      this.Size = new Size(this.Size.Width, NEW HEIGHT HERE);
      buttonPressed = true;
   }
}

```