|
-
May 3rd, 2000, 03:51 AM
#3
Lively Member
This is easy - just set the interval and then when the interval has elapsed, make your noise.
'set this to whatver you like - this is 24 hours
Public const INTERVAL = 60000 * 60 * 24
public sub StartTimer()
dim theTimer as long
theTimer = timer
do until (timer - theTimer) > INTERVAL
doevents
loop
'code to make your noise here - maybe add a mediaplayer
'control to your form and then do MediaPlayer1.open somemp3
'start the timer again recursively
StartTimer
end sub
Now just compile the program and run it when you want it to
start timing. Say you went to bed at midnight and wanted to get up at 7am. Just set the interval to 7 hours. Or you can actually make a clock but I will leave that up to you. The do until loop allows this to run in the background without pummeling your CPU too much.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|