All pastes #394953 Raw Edit

Stuff

public text v1 · immutable
·published 2007-03-14 18:09 UTC
rendered paste body
using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace MonoTest32
{
	class Form12 : Form
	{
		static void Main ()
		{
			Application.Run (new Form12 ());
		}

		public Form12 ()
		{
			Console.WriteLine (this.Handle);
			WindowState = FormWindowState.Maximized;
			Button b = new Button ();
			b.VisibleChanged += new EventHandler (b_VisibleChanged);
			b.Click += new EventHandler (b_Click);
			Controls.Add (b);
		}

		void b_Click (object sender, EventArgs e)
		{
			this.Hide ();
			this.Show ();
			this.MinimizeBox = false;
			this.MaximizeBox = false;
		}

		void b_VisibleChanged (object sender, EventArgs e)
		{
			Console.WriteLine ("Button visible set to: {0}", (sender as Button).Visible);
			Console.WriteLine (Environment.StackTrace.ToString ());
		}

		protected override void WndProc (ref Message m)
		{
			if (m.Msg == 0x0018)
				Console.WriteLine (m.ToString ());
			base.WndProc (ref m);
		}
	}
}