unit TCustomFormIcon;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

// BeginExample: TCustomFormIcon
// Property: Forms.TCustomForm.Icon

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