Creates a new System.Drawing.Graphics from the specified handle to a device context.
This method returns a new System.Drawing.Graphics for the specified device context.
You should always call the Graphics.Dispose method to release the System.Drawing.Graphics and related resources created by the Graphics.FromHdc(IntPtr) method.
Even if the display device has an associated ICM color profile, ndptecgdiplus will not use that profile by default. To enable ICM for a System.Drawing.Graphics, construct the System.Drawing.Graphics from an HDC after you pass the HDC (and ICM_ON) to the SetICMMode function. Then any drawing done by the System.Drawing.Graphics will be adjusted according to the ICM profile associated with the display device. Enabling ICM will result in slower performance.
The state of the device context (mapping mode, logical unit, and the like) at the time you call Graphics.FromHdc(IntPtr) can affect rendering done by the System.Drawing.Graphics.