Method DeleteObject
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
hObjectnintA handle to the GDI object to be deleted. This handle must have been created by a GDI function.
Returns
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.