namespace WinFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int formWidth = Width;
int formHeight = Height;
label1.Text = "Width: " + formWidth.ToString() + " Height: " + formHeight.ToString();
}
}
}
/*
* run:
*
* "Width: 816 Height: 489"
*
*/