Microsoft Communities

Welcome to WindowsClient.net | Sign in | Join

Here are some frequently asked questions about Windows Forms and their answers.

Windows Forms FAQs

How do I invalidate a control including its non-client region?

You can do so as follows in your Control:

private void InvalidateWindow() 
{ 
  NativeMethods.RedrawWindow( Handle, IntPtr.Zero, IntPtr.Zero, 
    0x0400 | // RDW_FRAME
    0x0100 | // RDW_UPDATENOW
    0x0001 ); // RDW_INVALIDATE
}

Contributed from George Shepherd's Windows Forms FAQ



Page view counter