System.Windows.Forms.Control.Invalidate C# (CSharp) Method

Invalidate() public method

public Invalidate ( ) : void
return void
		public void Invalidate ()
		{
			Invalidate (ClientRectangle, false);
		}

Same methods

Control::Invalidate ( Rectangle rc ) : void
Control::Invalidate ( Rectangle rc, bool invalidateChildren ) : void
Control::Invalidate ( Region region ) : void
Control::Invalidate ( Region region, bool invalidateChildren ) : void
Control::Invalidate ( bool invalidateChildren ) : void

Usage Example

Example #1
0
		public CloseBox(Control host)
		{
			this.host = host;

			host.Resize += delegate { host.Invalidate(); };

			host.MouseLeave += delegate
			{
				hover = false;
				host.Invalidate();
			};

			host.MouseMove += delegate(object sender, MouseEventArgs e)
			{
				bool h = bounds.Contains(e.Location);
				
				if (hover != h)
				{
					hover = h;
					host.Invalidate();
				}
			};

			host.MouseUp += delegate(object sender, MouseEventArgs e)
			{
				if (bounds.Contains(e.Location) && e.Button == MouseButtons.Left)
					Clicked();
			};
		}
All Usage Examples Of System.Windows.Forms.Control::Invalidate
Control