All pastes #395027 Raw Edit

Someone

public text v1 · immutable
·published 2007-03-14 19:03 UTC
rendered paste body
using System;
using System.Drawing;

using System.Windows.Forms;



namespace MonoTest32

{

	class Form12 : Form

	{
		
	

		static void Main ()

		{

			Application.Run (new DisplayRectangleForm ());
		}
		

	

		private class DisplayRectangleForm : Form
		{
			public DisplayRectangleForm ()
			{
				Control c = new Control ();
				c.BackColor = Color.Green;
				c.Anchor |= AnchorStyles.Bottom;
				c.Size = new Size (100, 100);
				Controls.Add (c);
			}
			
//			public override Rectangle DisplayRectangle
//			{
//				get { return Rectangle.Empty; }
//			}
		}

		



		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);

		}	

	}

}