Computing.Net > Forums > Programming > Batch / C / Visual Basic....

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch / C / Visual Basic....

Reply to Message Icon

Name: milind2517
Date: August 15, 2007 at 11:21:40 Pacific
OS: Windows XP
CPU/Ram: 512
Product: Intel
Comment:

Hi,

I have this query from very long time...


Actually I want to write a code that would run exactly after a certain time period. Means the program should run after 3 hrs or 5 hours. I am completely blank that how would the program communicate with the windows time. I want to write this code in Batch or Visual basic. And I think VB would be more preferable.

Can anyone guide to write the code??


Thanks & Regards,
Milind Gujar.



Sponsored Link
Ads by Google

Response Number 1
Name: StuartS
Date: August 15, 2007 at 13:08:32 Pacific
Reply:

VB would be fine, it has time and date functions built in. Look up the Time, Date and Now functions and the Timer function in the VB help files.

It is so easy it would take longer to look it up than actually write the code.

Stuart


0

Response Number 2
Name: Razor2.3
Date: August 15, 2007 at 17:48:41 Pacific
Reply:

Waiting? It's so easy, I wrote a VBScript to do this a long time ago. (For my batch files, you see):
H:\scripts>type sleep.vbs
On Error Resume Next
WScript.Sleep CInt(WScript.Arguments(0)) * 1000


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


C++ windows.h? batch file name(s) in mem...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch / C / Visual Basic....

visual basic and C# www.computing.net/answers/programming/visual-basic-and-c/1113.html

Integrating Batch with Visual Basic www.computing.net/answers/programming/integrating-batch-with-visual-basic/20311.html

Visual C++ or Visual Basic for Port www.computing.net/answers/programming/visual-c-or-visual-basic-for-port/10402.html