using System.Windows.Forms;
using System;
using sd = System.Drawing;

public class FormTest : System.Windows.Forms.Form {
	public FormTest() {
// begin primary test block
		sd.Size sz = new sd.Size(20,20);
		Button b = new Button();
		b.Size = sz;
// end primary test block
		b.Text = "Click me";
		b.Click += new System.EventHandler(ButtonClicked);
		Controls.Add(b);
		Closed += new System.EventHandler(FormClosed);
	}

	public void ButtonClicked(object sender, EventArgs e) {
		FormTest f = new FormTest();
		f.Visible = true;
		f.DesktopLocation = DesktopLocation; //should open new form at same position
		Visible = false;
	}

	public void FormClosed(object sender, EventArgs e) {
		Application.Exit();
	}
	static void Main() {
		Application.Run(new FormTest());
	}
}
