Hello all the friends of vbforums i've another problem on vb6 about timer contorol to take any messagebox or action after a certain time interval.
Printable View
Hello all the friends of vbforums i've another problem on vb6 about timer contorol to take any messagebox or action after a certain time interval.
So what is the problem?
Build a form with a Timer control and a Label. Then apply this code:
Code:Const TimeLimit = 9
Dim Tick As Integer
Private Sub Form_Load()
Timer1.Interval = 1000
Label1.Caption = vbNullString
End Sub
Private Sub Timer1_Timer()
Tick = Tick + 1
Label1.Caption = Tick
If Tick > TimeLimit Then
Timer1.Enabled = False
MsgBox Tick & " seconds have elapsed."
Tick = 0
Timer1.Enabled = True
End If
End Sub
My problem is how to display that message box of another form after a certain time interval
Thanks alot sir