Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 06-12-2006, 10:27 PM
FuNkY14 FuNkY14 is offline
Member
 
Join Date: Feb 2006
Posts: 32
Default Timer on form

Hey guys!
How do I go about to let a certain form only display for a specific time after which it then closes?
Thanks
Reply With Quote
  #2  
Old 06-12-2006, 11:55 PM
mahyadhn mahyadhn is offline
Member
 
Join Date: Sep 2005
Posts: 45
Default RE: Timer on form

put a TTimer on the form :


Timer1.Interval := 5000; // Five Seconds.

procedure TForm1.Timer1Timer(Sender: TObject);
begin
Close;
end;

wish it helps !

Mahya
Reply With Quote
  #3  
Old 06-12-2006, 11:59 PM
Jammni Jammni is offline
Senior Member
 
Join Date: May 2001
Posts: 135
Default RE: Timer on form

Put a Timer component on the form, adjust the timer interval , disable the timer and in the OnTimer event write the following:

Code:
Hide();
Timer1.Enabled:= false;
In the form Activate event write the following:

Code:
Timer1.Enabled:= true;
Every time you show this form it will close after the timer interval.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 02:21 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.