this is the code I've been trying..
- Code: Select all
Var
Icon : TIcon;
IconHandle : HIcon;
Begin
Icon := TIcon.Create;
Try
iconHandle := ExtractIcon(Application.Handle, 'C:\WINDOWS\notepad.exe', 0) ;
Icon.Handle := iconHandle;
Icon.SaveToFile('D:\notepad.ico');
Application.Icon := Icon;
Finally
Icon.Free;
End;
End;