Изменение текста в Caption
Как изменить текст в Caption формы, в зависимости активная она или нет.
Заранее признателен.
Application.
<TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD>Code:<HR></TD></TR><TR><TD><FONT SIZE=-1><PRE>type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure ChangeCaption (Sender: TObject);
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.ChangeCaption(Sender: TObject);
begin
if Application.Active then
Application.MainForm.Caption := 'Active'
else
Application.MainForm.Caption := 'Inactive'
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnActivate := ChangeCaption;
Application.OnDeActivate := ChangeCaption;
end;</PRE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE>