How to set window size in a WinForms application using C#

1 Answer

0 votes
namespace WinFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Size = new System.Drawing.Size(800, 600); // Set form size
        }
    }
}



/*
run:
 

 
*/

 



answered Apr 2 by avibootz
...