public static GDIContext CreateForDevice(string device, string name) { IntPtr hdc = IntPtr.Zero; hdc = GDI32.CreateDC(device, name, null, IntPtr.Zero); GDIContext newContext = new GDIContext(hdc, true); return newContext; }