Graphics::ReleaseHdc Method ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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)

public:
[SecurityPermissionAttribute(SecurityAction::LinkDemand, Flags = SecurityPermissionFlag::UnmanagedCode)]
virtual void ReleaseHdc() sealed

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: