System.Windows.Forms.Control.Invalidate(System.Drawing.Region, bool)

Here are the examples of the csharp api class System.Windows.Forms.Control.Invalidate(System.Drawing.Region, bool) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

Project: JexusManager
Source File: Areo.cs
View license
public static void ExtendFrameIntoClientArea ( this Form form, Control glassArea ) {
			if ( IsGlassSupported ) {
				if ( glassArea.Dock != DockStyle.Top ) {
					glassArea.Dock = DockStyle.Top;
					glassArea.SendToBack ();
				}
				glassArea.BackColor = Color.Transparent;
				glassArea.Resize += delegate ( object sender, EventArgs e ) {
					form.Invalidate ( glassArea.Region, true );
				};

				form.Paint += delegate ( object sender, PaintEventArgs e ) {
					using ( SolidBrush blackBrush = new SolidBrush ( Color.Black ) ) {
						e.Graphics.FillRectangle ( blackBrush, glassArea.ClientRectangle );
					}
				};

				MARGINS marg;
				marg.Top = glassArea.Height;
				marg.Left = 0;
				marg.Right = 0;
				marg.Bottom = 0;
				DwmExtendFrameIntoClientArea ( form.Handle, ref marg );

				glassArea.SetGlassWindowDragable ();
			}
		}