Insane Killa
Dec 11th, 1999, 04:24 AM
I've asked this question before, but no answer has ever worked to successfully.
I have my app checking to see if there is an internet connection, but I want it to start timing the connection on a label if it finds a connection.
Can someone help.
DiGiTaIErRoR
Dec 11th, 1999, 05:09 PM
make a timer set the interval to 500 (timer1)
make a textbox (text1)
make a label equal to the time they logged on (label1)
Private Sub Timer1_Timer()
Dim Secs As Integer
Dim Mins As Integer
Dim Hours As Integer
Secs = Right(Time$, 2) - Right(Label1.Caption, 2)
If Secs < 0 Then Secs = 60 - Right(Label1.Caption, 2) + Right(Time$, 2)
If Right(Time$, 2) >= Right(Label1.Caption, 2) Then Mins = Val(Mid$(Time$, 4, 2)) - Val(Mid$(Label1.Caption, 4, 2))
If Mins < 0 Then Mins = 60 - Val(Mid$(Label1.Caption, 4, 2)) + Val(Mid$(Time$, 4, 2))
Hours = Left(Time$, 2) - Left(Label1.Caption, 2)
Text1.Text = Hours & ":" & Mins & ":" & Secs
End Sub
it checks label1 against the current time
and displays the difference (duration) in text1.text if you don't get it ur dumb :)
------------------
DiGiTaIErRoR