Jump to content
xisto Community

paulbacca

Members
  • Content Count

    2
  • Joined

  • Last visited

Everything posted by paulbacca

  1. Hi de4thpr00f, would you know how to add hours to your code below. I would appreciate any help you can give. Thanks Paul
  2. Hi all,Can you help me with the script below. I found this code on a old posting. I would like to able too input a value for hours and have that countdown also.ThanksPaul Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim hours As Integer = countminutes.Text Dim minutes As Integer = countminutes.Text Dim seconds As Integer = countseconds.Text If hours = 0 And minutes = 0 And seconds = 0 Then 'MsgBox("Time Ended") Timer1.Stop() End If If seconds = 0 Then minutes -= 1 seconds += 60 End If seconds -= 1 If minutes <> -1 Then counthours.Text = minutes countminutes.Text = minutes countseconds.Text = seconds End If End Sub Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If InStr(timetowait.Text, ":") Then Dim time() As String time = Split(timetowait.Text, ":", , CompareMethod.Text) countminutes.Text = time(0) countseconds.Text = time(1) Timer1.Interval = 1000 Timer1.Start() Else : MsgBox("You have to insert like this 1:10") End If End Sub
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.