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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detect form finished being displayed?

Status
Not open for further replies.

bobbie100

Programmer
Aug 29, 2003
64
GB
I have some processing that I need to carry out after the main form is displayed the first time. How can I tell that the Form has finished the process of being displayed after it is created. I have a number of components and controls on the form including some created at run-time.
Many thanks,
Bob
 
You can try using the a timer (Ttimer) like so:

type Tf1=class (tform) ......
t1:ttimer
.....

end;

var f1:Tf1;

implementation

procedure Tf1.formcreate(sender:tobject);
begin
.....
t1.interval:=1;
t1.enabled:=true;
end;

procedure tf1.t1timer(sender:tobject)
begin
t1.enabled:=false;
{ the inctructions}
end;


This way the instructions will run only one time after a milisecond
end;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top