I'd like to make a program that includes a countdown - you can either specify a date/time or set a countdown timer, and when it reaches the specified time it executes code (shuts down the PC in this case).
I've heard that the VB timer built in isn't very good; I was wondering if there's anything better?
I've come across This but it just says that I don't have the correct licence when I try to run it (I have registered it within VB).
Any ideas of how I might go about doing this?
Thanks
Last edited by BubbleLife; Sep 10th, 2005 at 02:36 PM.
as RobDog said the vb timer is not acurate if it comes to counting in a less then milliseconds, in your case it won't do much of a change but if you really want a good acurate controll check this, its free and got tons of extras:
1) If your post has been adequately answered please click in your post on "Mark Thread Resolved".
2) If someone has been useful to you please show your respect by rating their posts.
3) Please use [highlight="VB"] 'your code goes in here [/highlight] tags when posting code.
4) Before posting your question, make sure you checked this links: MICROSOFT MSDN -- VB FORUMS SEARCH
5)Support Classic VB - A PETITION TO MICROSOFT
My other question, then, would be how to actually use the timer in this way? I've not had any experiance with timers up to now, since I'm really a newbie to VB (I just make programs based on the little unit we covered in our college course, which was only a small unit).
I have a book which shows how to make it execute something on every interval of the timer but what I really need is for it to do two things:
A. Change a text label or similar each interval to show how much time is remaining (basically so it looks like it's counting down)
B. Execute the script when the countdown reaches 0
I was planning to have a countdown system (They specify, say, "2 hours" and it counts down, or they just pick a date/time to activate). Whether this will require different timers or a different way of working I'm not sure
I've attatched a rudimentary idea of what i'm trying to do. Any advice for using timers here? Remember, I really don't have any idea how they work.