public static extern bool EndPaint(IntPtr hWnd, ref PAINTSTRUCT ps); [DllImport("User32.dll", CharSet=CharSet.Auto)]