|
-
Sep 14th, 2005, 09:18 PM
#3
Thread Starter
Addicted Member
Re: Annoying Time format issue
 Originally Posted by putta
VB Code:
Private Sub Form_Load()
Timer1.interval = 1000
Timer1.enabled = true
RefreshInt = Val(TxtInterval.txt) * 60 ' Take the interval time from a text box
End Sub
Private Sub Timer1_Timer(ByVal RefreshInt as Integer )
RefreshInt = RefreshInt - 1
Lbl.Caption = RefreshInt & "seconds" ' For displaying the countdown in a label
If RefreshInt = 0 Then
'## Execute Main Function of scanning and cheking
' Run the function what ever you wish too when the countdown
DoFunction
End If
End Sub
The problem here is that, I don't have a text box that i can take an amount of seconds from. I have countdown timers working fine, the program is using it on this format. I'm assuming this is the solution for the right hand (click) side of the form?
For displaying the time left for shutdown.. try taking the current system time. Split it into a array and display some information on to a label or a text box after reducing the time shown in seconds in the first label from a the corresponding array index.
Hope it helps ...
--Putta
Could you explain to me how to use arrays though, please? I'm really a complete newbie to VB and we weren't taought that in the real basics of our course. Thanks
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
|