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

close form after 10 min.

Status
Not open for further replies.

vbpadawan

Programmer
Oct 8, 2002
28
US
I need to be able to close a form after it has been open for 10 min. How can I determine how long it has been open?
 
One way, add a timer control to the form. In the Timer1_Timer event add a static integer variable as a counter.
Each time the timer event fires add 1 to the counter.
If Counter = 10 then unload the form.

When the form loads set the timer interval property to 60000 (1min) and the enabled property to true.

The time is only approximate but should be close enough for general use (?).

You can find more info by searching for other threads dealing with timing/timers.

Hope this helps


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top