| 
      ...get the Icon from another Window?
     | 
   
   
    | Autor: 
      Thomas Stutz     | 
   
  | [ Print tip 
] |   |   |   
 
 
 
{ 
{ 
  First Start Notepad.exe and run this code: 
  Starte zuerst Notepad.exe und führe dann diesen Code aus: 
} 
 
procedure TForm1.Button1Click(Sender: TObject); 
var 
  hwindow : THandle; 
  H: HIcon; 
begin 
  hwindow := FindWindow('notepad',nil); 
  H := CopyIcon(GetClassLong(hwindow, GCL_HICON )); 
  DrawIcon(Canvas.Handle, 30, 30, H); 
end; 
 
 
  
                       |