TIP: Click on subject to list as thread! ANSI
echo: nthelp
to: Richard B.
from: Ellen K
date: 2003-06-09 15:22:28
subject: Need to control application startup

Put a timer as the first thing in the Open event of the app, set it to run
for 30 seconds, then call what would have been your opening routine or
function.

In VB this looks like:

  Dim start As Long
  start = Timer
  Do While Timer <= start + 30
    DoEvents
  Loop

Caveat:  If the machine might get booted up right around midnight, you need
to add an escape hatch so as not to get caught in an endless loop. 
("Timer" in VB is the number of seconds elapsed since midnight,
so if you start this at 11:59:45, you'll never get out of the loop.)  

> From: Richard B. 
> I need to start a program (actually a print queue from another
> application) when the computer boots. Is there some way to force an
> application to wait a certain amount of time before starting up? If I
> could make this print queue wait about 30s after the machine boots up
> that would do nicely.
> - Richard

--- BBBS/NT v4.01 Flag-4
* Origin: Barktopia BBS Site http://HarborWebs.com:8081 (1:379/45)
SEEN-BY: 633/267 270
@PATH: 379/45 1 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.