Automatic Time Manager (ATM)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adeebraza
    New Member
    • Nov 2006
    • 20

    #1

    Automatic Time Manager (ATM)

    Hi Every Body

    The following is the code for generation of 1/100 of a seconds Time and used Them for recording of a Race time for five Track on a ground.

    Option Explicit
    DIM, C,M,S

    Private Sub Form_Load()
    Timer2.Enabled = False
    End Sub
    '
    Private Sub Timer1_Timer()
    Label4.Caption = Format(Date, "dd.mm.yyyy ")
    Label5.Caption = Time
    End Sub
    '
    '************** ************** Trac no.01 *************** ***********
    Private Sub Label17_Click()
    ID1 = Text4.Text
    Label18.Caption = C
    Label19.Caption = S
    Label20.Caption = M
    C1 = C
    S1 = S
    M1 = M
    Label17.Enabled = False
    End Sub
    ''************* *************** Trac no.02 *************** ***********
    Private Sub Label21_Click()
    ID2 = Text5.Text
    Label22.Caption = C
    Label23.Caption = S
    Label24.Caption = M
    C2 = C
    S2 = S
    M2 = M
    Label21.Enabled = False
    End Sub
    ''************* *************** Trac no.03 *************** ***********
    Private Sub Label25_Click()
    ID3 = Text6.Text
    Label26.Caption = C
    Label27.Caption = S
    Label28.Caption = M
    C3 = C
    S3 = S
    M3 = M
    Label25.Enabled = False
    End Sub
    ''************* *************** Trac no.04 *************** ***********
    Private Sub Label29_Click()
    ID4 = Text7.Text
    Label30.Caption = C
    Label31.Caption = S
    Label32.Caption = M
    C4 = C
    S4 = S
    M4 = M
    Label29.Enabled = False
    End Sub
    ''************* *************** Trac no.05 *************** ***********
    Private Sub Label33_Click()
    ID5 = Text8.Text
    Label34.Caption = C
    Label35.Caption = S
    Label36.Caption = M
    C5 = C
    S5 = S
    M5 = M
    Label33.Enabled = False
    End Sub
    '
    ''************* *********** MASTER TIMER *************** **************
    '
    Private Sub Timer2_Timer()
    C = C + 1 'Counter for time generation of 10 m.s.
    Label9.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
    Label10.Caption = S 'Seconds
    '
    If S = 60 Then M = M + 1 'One Minute
    If S = 60 Then S = 0 'Max 59.99 Minutes
    Label11.Caption = M 'Minutes
    End Sub
    '

    Private Sub Command1_Click( )
    Label7.Caption = Time 'Master Timer
    Timer2.Enabled = True 'Race Times
    '************** *************** ***************
    CODE = Text1.Text
    Dt = Date
    RST = Label7.Caption
    GROUND = Text2.Text
    LENGTH = Text3.Text
    '
    Timer2.Enabled = False
    C = 0
    S = 0
    M = 0
    Label9.Caption = 0
    Label10.Caption = 0
    Label11.Caption = 0
    '******* 1************
    Label17.Enabled = True
    Text4.Text = ""
    Label18.Caption = 0
    Label19.Caption = 0
    Label20.Caption = 0
    '********2***** ******
    Label21.Enabled = True
    Text5.Text = ""
    Label22.Caption = 0
    Label23.Caption = 0
    Label24.Caption = 0
    '*********3**** ******
    Label25.Enabled = True
    Text6.Text = ""
    Label26.Caption = 0
    Label27.Caption = 0
    Label28.Caption = 0
    '*********4**** ******
    Label29.Enabled = True
    Text7.Text = ""
    Label30.Caption = 0
    Label31.Caption = 0
    Label32.Caption = 0
    '*********5**** ******
    Label33.Enabled = True
    Text8.Text = ""
    Label34.Caption = 0
    Label35.Caption = 0
    Label36.Caption = 0
    '************** *****
    End Sub
    '
    Private Sub Command2_Click( )
    End
    End Sub

    For more VB-6 Hint & Help on time generation click on the followink Link


    Thanks
    Adeeb Raza
Working...