[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Graphics' (#lcl)

# TIcon.Handle

Handle used to access the image data for the icon.

## Declaration

Source position: graphics.pp line 1692

`public property TIcon.Handle : HICON read GetIconHandle write SetIconHandle;`

## Description

Handle is a HICON property which contains the handle for the icon used to access its image data. The property value is provided by the inherited GetHandle method, and contains the handle for its TSharedRasterImage instance.

Setting a new value for the property causes the previous handle and the canvas device context to be freed. The previous image is cleared and unshared as well.

The inherited UpdateHandle method is called to apply the new handle to the shared image, and to load its icon data.

## See also

TCustomIcon.SetHandle |  | Unshares an existing shared image handle and set the new value.
TCustomIcon.UpdateHandle |  | Updates the handle in the shared icon image top the specified value.
TRasterImage.GetHandle |  | Gets the value for the handle used in the image.
TSharedRasterImage.HandleAllocated |  | Determines whether the Handle for the class has been allocated.