function LoadIco


function LoadIco(Bmp : TBitmap32; Iconfile : string; Size : integer) : boolean;

Declared in: svn\Common\Units\SharpIconUtils\SharpIconUtils.pas


Parameters

  • Bmp: TBitmap32

Pointer/Handle to a valid TBitmap32 which will receive the loaded icon

  • IconFile: String

Path to the .ico file which will be loaded.

  • Size: integer

When loading .ico files it could be important to specify the base size of the icon which should be loaded from the file (.ico files can contain several icons of different size).
If you need to extract bigger icons then make sure to adjust this parameter.
If the param is set to 0 the system default value for the icon size is used.


Description

By using the loadico function an .ico file is loaded and converted into a TBitmap32 with full alpha channel data.
Loading icons can also be done by using the IconStringToIcon function.


Examples

  LoadIco(MyBitmap,'C:\1.ico',32);