public static GDIContext CreateForWholeWindow(IntPtr hWnd) { IntPtr hdc = IntPtr.Zero; hdc = User32.GetWindowDC(hWnd); GDIContext newContext = new GDIContext(hdc, false); return newContext; }