Graphics.ReleaseHdc Method ()

 

Releases a device context handle obtained by a previous call to the GetHdc method of this Graphics.

Namespace:   System.Drawing
Assembly:  System.Drawing (in System.Drawing.dll)

<SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags := SecurityPermissionFlag.UnmanagedCode)>
Public Sub ReleaseHdc

GetHdc and ReleaseHdc are two methods that allow you to get and release the handle for a Windows device. You should always follow a call to GetHdc with a call to ReleaseHdc when you are finished with the Windows handle.

SecurityPermission

for access to unmanaged code. Related enumeration: UnmanagedCode.

.NET Framework
Available since 2.0
Return to top
Show: