[C#] Resize of a Windows Form

Results 1 to 2 of 2

Thread: [C#] Resize of a Windows Form

  1. #1
    Join Date
    Dec 1969

    Default [C#] Resize of a Windows Form

    Hi.<BR><BR>I would like to know how to resize a Windows Form with a button... So when i&#039;ll click on this button, my window form will resize to 500*500 px...<BR><BR>Someone?<BR><BR>Jeff

  2. #2
    Join Date
    Dec 1969

    Default Easy

    in your "OnClick" handler for the button which can be created by double clicking the button in design view OR<BR>this.cmdMyButton.Click += new EventHandler(myButtonHandler);<BR><BR>where cmdMyButton is the name of your button<BR><BR>then make a void function myButtonHandler that takes an object sender and EventArgs e ,<BR><BR>then saying<BR>this.Width = 500;<BR>this.Height = 500;<BR><BR>Simple.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts