Board index » delphi » change appl title when minimizing

change appl title when minimizing

How can I change the application title, when the program is minimizing and
maximizing.
 

Re:change appl title when minimizing


on form1.create stick this is:   form1.onminimize:=yourprocedure
form1.onmaximize:=yourprocedure2

procedure yourprocedure;
begin
form1.caption:='This is the new title';
end;

procedure yourprocedure2;
begin
form1.caption:='This is the title while maximising';
end;

Nick

Quote
"T Wolf" <tow...@i4.auc.dk> wrote in message news:a2f5cg$rr2$1@sunsite.dk...
> How can I change the application title, when the program is minimizing and
> maximizing.

Re:change appl title when minimizing


It dosn't seem to work. Do I have to add some uses, or what can be the
problem.

Quote
"Nicholas Sherlock" <n_sherl...@hotmail.com> wrote in message

news:a2fult$sa8$1@lust.ihug.co.nz...
Quote
> on form1.create stick this is:   form1.onminimize:=yourprocedure
> form1.onmaximize:=yourprocedure2

> procedure yourprocedure;
> begin
> form1.caption:='This is the new title';
> end;

> procedure yourprocedure2;
> begin
> form1.caption:='This is the title while maximising';
> end;

> Nick

> "T Wolf" <tow...@i4.auc.dk> wrote in message

news:a2f5cg$rr2$1@sunsite.dk...

- Show quoted text -

Quote
> > How can I change the application title, when the program is minimizing
and
> > maximizing.

Re:change appl title when minimizing


Quote
In article <a2gjit$sf...@sunsite.dk>, "T Wolf" <tow...@i4.auc.dk> writes:
>It dosn't seem to work. Do I have to add some uses, or what can be the
>problem.

You have to utilise the Aplication object ...

In FormCreate ...

Application.OnMinimise := AppMinimise;
Application.OnRestore := AppRestore;

... and in MyForm code ...

procedure TMyForm.AppMinimise(Sender : TObject);
begin
  Application.Title := 'MyApp Minimised';
end;

procedure TMyForm.AppRestore(Sender : TObject);
begin
  Application.Title := 'MyApp Restored';
end;

Alan Lloyd
alangll...@aol.com

Other Threads