using System; using System.Windows.Forms; namespace MonoTest32 { class Form12 : Form { static void Main () { Application.Run (new Form12 ()); } public Form12 () { Console.WriteLine (this.Handle); WindowState = FormWindowState.Normal; Button b = new Button (); b.VisibleChanged += new EventHandler (b_VisibleChanged); Controls.Add (b); } void b_VisibleChanged (object sender, EventArgs e) { Console.WriteLine ("Button visible set to: {0}", (sender as Button).Visible); } } }