ExtractAssociatedIcon


ExtractAssociatedIcon Api function used to extract icons from registered extentions,
such as icon of .
bat files, .bmp files, etc. The result icon can be displayed in
a picture. Example:


- Drop
Image component from Additional Page
- Drop an
Edit box
- Drop a
Button
- Add
ShellApi to Uses claus.
- At Button's
OnClick event write:

var
Index: Word;
begin
Image1.Picture.Icon.Handle:=
ExtractAssociatedIcon(HInstance,
    PChar(Edit1.Text), Index);
end;

- Run the application and write a full-qualified file name in the Edit box then
click the button. If the file is exists, the icon assotiated with it's extention
will appear in
Image control.