Table of Contents

Method DeleteObject

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

DeleteObject(nint)

Deletes a GDI object, such as a pen, brush, font, bitmap, or region, and frees any system resources associated with it.

public static extern bool DeleteObject(nint hObject)

Parameters

hObject nint

A handle to the GDI object to be deleted. This handle must have been created by a GDI function.

Returns

bool

true if the object is successfully deleted; otherwise, false.

Remarks

After the object is deleted, the handle becomes invalid and should not be used in subsequent GDI calls. Ensure that the handle is no longer in use before calling this method to avoid undefined behavior.