VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Complete replacement for the timer control,in 38 lines of code with no API calls or ActiveX control

VB-Kung-Fu  (19 Submissions)   Custom Controls/Forms/Menus   VB 6.0   Unknown Difficulty   Sun 9th November 2003   Mon 8th February 2021

Complete replacement for the timer control,in 38 lines of code with no API calls or ActiveX controls!! Can be started, stopped and paused for

API Declarations


'with two command buttons, to see the CTimer class in action

Public WithEvents t As CTimer

Private Sub Command1_Click()
Set t = New CTimer
Me.Caption = 0
Call t.StartTimer(1)
End Sub

Private Sub Command2_Click()
t.StopTimer
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If (t Is Nothing) = False Then t.StopTimer
End Sub

Private Sub t_Timer()
Me.Caption = Me.Caption + 1
End Sub


Rate Complete replacement for the timer control,in 38 lines of code with no API calls or ActiveX control (2(2 Vote))
Complete replacement for the timer control,in 38 lines of code with no API calls or ActiveX control.bas

Complete replacement for the timer control,in 38 lines of code with no API calls or ActiveX control Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters