Quote Originally Posted by putta
VB Code:
  1. Private Sub Form_Load()
  2.  
  3. Timer1.interval = 1000
  4. Timer1.enabled = true
  5. RefreshInt = Val(TxtInterval.txt) * 60 ' Take the interval time from a text box
  6.  
  7. End Sub
  8.  
  9.  
  10. Private Sub Timer1_Timer(ByVal RefreshInt as Integer )
  11.  
  12. RefreshInt = RefreshInt - 1
  13. Lbl.Caption = RefreshInt & "seconds" ' For displaying the countdown in a label
  14.     If RefreshInt = 0 Then
  15.  
  16.     '## Execute Main Function of scanning and cheking
  17.    ' Run the function what ever you wish too when the countdown
  18.     DoFunction
  19.    
  20. End If
  21.  
  22. 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