partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
resize();
}
private void resize()
{
// to do
// width.Text = "233";
// height.Text = "96";
int w = this.Size.Width;
width.Text = w.ToString();
int h = this.Size.Height;
height.Text = h.ToString();
string s=null;
try
{
s = string.Format("({0},{1})", w, h);
}
catch (FormatException fx)
{
Console.WriteLine(fx.Message);
}
this.Text = s;
}
private void Form1_Resize(object sender, EventArgs e)
{
resize();
}