Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delphi - changing caption on FormLoad

Status
Not open for further replies.

perlone

Programmer
May 20, 2001
438
US
Hello,

I'm from Visual Basic and decided to go for Delphi. I want to change the caption of the form when the form loads. I was wondering if any of you can show me How. Thank you for your time.

There is no Knowledge that is not power.
Age: 17
E-mail: projectnet01@yahoo.com
Company:(not done yet) :)
Status: Currently working with C++ for game developing. And making a musical band.
-Aaron
 
hi,

In the form create

caption := ' Mine Caption' ;
or
Form1.Caption := ' Mine Caption' ;

Steph [Bigglasses]
 
If you have to change the caption every time the form appears, you will need to put Svanhooft's code in the form's OnActivate event. Or you can do something like this in the calling form...

Code:
//Clicked is an integer
procedure TMainForm.bbutNewFormClick(sender: TObject);
begin
   inc(clicked);
   Settings.Caption:= format('This form loaded %d times.', [clicked]);
   Settings.Show;
end;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top