Search results for 'ExtractAssociatedIcon'. 1 post(s) found.

  1. 2007/09/11 Extract an icon from an Windows application and paint on a Form
2007/09/11 07:49

Extract an icon from an Windows application and paint on a Form


This tip shows how to extract the associated icon and draw it into a small area of the form (e.g. Notepad icon)?

procedure TForm1.Button1Click(Sender: TObject) ;
var
  IconIndex : word;
  h : hIcon;
begin
  IconIndex := 0;
  h:=ExtractAssociatedIcon(hInstance,'C:\WINDOWS\NOTEPAD.EXE', IconIndex) ;
  DrawIcon(Form1.Canvas.Handle, 10, 10, h) ;
end;
Trackback 3 Comment 0

Trackback : Cannot send a trackbact to this post.

  1. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 02:54 delete

    moneyideas

  2. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 11:25 delete

    moneyideas

  3. Subject different money making ideas

    Tracked from moneyideas 2010/01/31 16:39 delete

    moneyideas