Dear Friends
I want to know how to generate 1/100 of a second time in VB6 for On/Off Timer
function for Automatic Time Manager (ATM) through PC's LPT-1 Port with Interfac. Kindly help me.
Thanks
Khushtar Zia
Hi,
I am prividing you a simple method fro generation of 1/100 second time of a second with the help of timer and acounter as given in the following code.
Private Sub Timer1_Timer() ------> Set timer at 10
C = C + 1 '-------------------------------------> Counter for time generation of 10 m.s.
Label1.Caption = C '------------------------> 1/100 Seconds
If C = 100 Then S = S + 1'----------------> 100 counts = 1 mil seconds
If C = 100 Then C = 0 '---------------------> One Second
Label2.Caption = S '-----------------------> Seconds
'
If S = 60 Then M = M + 1'------------------> One Minute
If S = 60 Then S = 0 '----------------------> Max 59.99 Minutes
Label3.Caption = M '----------------------> Minutes
End Sub
Also click on the following link, I think you will get an idea for the same
Thanks
Adeeb Raza