RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomForm.Icon Property

Specifies the icon that appears when the form is minimized.

Pascal
property Icon: TIcon;
C++
__property TIcon Icon;

Set the Icon property to provide an icon for the form. If Icon is not set, the system provides a default icon when the form is minimized.  

C++ Examples: 

 

/*
This code assigns an icon to a form when the form is created:
*/
void __fastcall TForm1::FormCreate(TObject *Sender)
{
  Icon->LoadFromFile("..\\MDIChild1.ICO");
}

 

Delphi Examples: 

{
This code assigns an icon to a form when the form is created:
}
procedure TForm1.FormCreate(Sender: TObject);
begin
  Icon.LoadFromFile('MDIChild1.ICO');
end;

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!