time delay during program execution

Please support our VB.NET advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Jun 2006
Posts: 25
Reputation: hoosier23 is an unknown quantity at this point 
Solved Threads: 1
hoosier23 hoosier23 is offline Offline
Light Poster

time delay during program execution

 
0
  #1
Jun 13th, 2006
I am creating a program that will install multiple programs, because I build new computer quite often. For example "MyInstallProgram" will launch and allow the user to select which programs (MSOffice, Acrobat, WinZip etc.) to install.

When compiling the program, what code can I use that will insert a time delay so that I do not have 5 install programs running and installing all at once.

Is there code that would insert 30 seconds before the next line of code is executed? What would that code look like?


Logic:

If MSOffice checked then,
open c:\windows\msofficesetup.exe

wait 30 seconds

If Acrobat checked then,
open c:\acrobatsetup.exe

wait 30 seconds...

etc.
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 1,542
Reputation: tayspen is on a distinguished road 
Solved Threads: 98
Team Colleague
tayspen's Avatar
tayspen tayspen is offline Offline
<Insert title here>

Re: time delay during program execution

 
0
  #2
Jun 13th, 2006
Somthing like.

  1.  
  2. System.Threading.Thread.Sleep(1000) ' Sleep for 1 second

?
Firefox
Ewido
Tune up windows
Get detailed system information
My Fixes

Member - Alliance of Security Analysis Professionals - Since 2006
Reply With Quote Quick reply to this message  
Join Date: Dec 2002
Posts: 461
Reputation: waynespangler is on a distinguished road 
Solved Threads: 56
waynespangler waynespangler is offline Offline
Posting Pro in Training

Re: time delay during program execution

 
0
  #3
Jun 14th, 2006
check out this site for how to delay until the process has ended to continue with the next one.
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 1,542
Reputation: tayspen is on a distinguished road 
Solved Threads: 98
Team Colleague
tayspen's Avatar
tayspen tayspen is offline Offline
<Insert title here>

Re: time delay during program execution

 
0
  #4
Jun 14th, 2006
What site? I think you forgot to post the link .
Firefox
Ewido
Tune up windows
Get detailed system information
My Fixes

Member - Alliance of Security Analysis Professionals - Since 2006
Reply With Quote Quick reply to this message  
Join Date: Dec 2002
Posts: 461
Reputation: waynespangler is on a distinguished road 
Solved Threads: 56
waynespangler waynespangler is offline Offline
Posting Pro in Training

Re: time delay during program execution

 
0
  #5
Jun 14th, 2006
Sorry about that.
http://www.devx.com/dotnet/Article/7914/0/page/2
Hope this helps,
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 18710 | Replies: 4
Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC