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

# TIcon

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TIcon - icons, small images typically associated with applications, controls, etc.

## Declaration

Source position: graphics.pp line 1652

`type TIcon = class(TCustomIcon)`
``
`class function GetTypeID; override;` |  | GetTypeID - returns Identifier for type of Icon
`protected`
`procedure HandleNeeded; override;` |  | HandleNeeded - method to signal that a handle is required
`public`
`function ReleaseHandle;` |  | ReleaseHandle - frees the handle that was iused for the Icon
`function GetResourceType; override;`
`property Handle: HICON; [rw]` |  | The Operating System Handle used for the Icon
`end;`

## Inheritance

`TIcon` |  | TIcon - icons, small images typically associated with applications, controls, etc.
`TCustomIcon` |  | TCustomIcon - base class for TIcon
`TRasterImage` |  | TRasterImage - base class for a number of graphic controls, including TCustomBitmap and TCustomIcon, which use a raster of dots to display graphic information
`TGraphic` |  | TGraphic - Base class for dealing with Graphic images
`TPersistent`
`TObject`

## Description

Icons can be loaded from .ICO files, or from Lazarus resources.

An icon resource typically contains several versions of the same image, in multiple resolutions and color depths.

When loading, the largest/most colourful image is loaded as the Bitmap property, and so can be handled as any other bitmap.

## Errors

Writing to icon files is not (yet) implemented.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.