
12-23-2003, 12:41 PM
|
 |
Junior Contributor
|
|
Join Date: Dec 2003
Location: USA in New Mexico
Posts: 374
|
|
|
To show the time open or left have a timver set to 1 second(100 miliseconds) and have it set the forms caption to form1.caption = "Form1" & <current time>. As for being open for 5 minuts, you can set a timer for 5 minuts (not recomended becuase you already have a timer for 1 second) or just use the 1 second timer to add 1 to a varible every second and when the varible = 5*60(5 minuts) close the program.
Now the only problem you will have it the foms caption will display the time open in seconds (you can do time till close as 5*60 - time open). to display the time in minuts you simply hacve to have a function taht converts seconds into minuts and seconds sumting like
Private Function Convert(Seconds as Int) as string
Convert = int(Seconds/60) * (Seconds mod 60)
end Function
Check to make shrue the function works i just made it up on the spot i have not tested it
|
|