/// <summary> /// Refreshes the window to get rid of the previously drawn rectangle. /// </summary> public static void Refresh(IntPtr hWnd) { Win32.InvalidateRect(hWnd, IntPtr.Zero, true); Win32.UpdateWindow(hWnd); const Win32.RedrawWindowFlags flags = Win32.RedrawWindowFlags.RDW_FRAME | Win32.RedrawWindowFlags.RDW_INVALIDATE | Win32.RedrawWindowFlags.RDW_UPDATENOW | Win32.RedrawWindowFlags.RDW_ALLCHILDREN; Win32.RedrawWindow(hWnd, IntPtr.Zero, IntPtr.Zero, flags); }
public static extern bool RedrawWindow(IntPtr hWnd, IntPtr lprcUpdate, IntPtr hrgnUpdate, Win32.RedrawWindowFlags flags);