il problema è questo, ho trovato questo cronometro....
Dim tempo As Long
Dim giro As Integer
Dim sopflag As Boolean
Private Declare Function GetTickCount Lib "kernel32" () As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()
If Command1.Caption = "Start" Then
Command1.Caption = "Stop"
Else
Command1.Caption = "Start"
End If
If Command1.Caption = "start" Then Exit Sub
inizio = GetTickCount
Do: DoEvents
tempotmp& = GetTickCount - inizio
Sleep (5)
Label2.Caption = Format$(tempotmp& \ 3600000, "00") & ":" & Format$(((tempotmp& - (tempotmp& \ 3600000) * 3600000)) \ 60000, "00") & ":" & Format$((tempotmp& - (tempotmp& \ 60000) * 60000) / 1000, "00.000")
Loop Until Command1.Caption = "Start"
End Sub
Private Sub Command2_Click()
If Command1.Caption = "Start" Then Exit Sub
If giro < 10 And giro >= 0 Then spazio$ = Space$(4)
If giro < 100 And giro >= 10 Then spazio$ = Space$(3)
If giro < 1000 And giro >= 100 Then spazio$ = Space$(2)
If giro >= 1000 Then spazio$ = Space$(1)
orario1tmp$ = "00:00:00,000"
If List1.List(List1.NewIndex) <> "" Then
orariotmp& = Mid$(List1.List(List1.NewIndex), 11, 2) * 3600000 + Mid$(List1.List(List1.NewIndex), 14, 2) * 60000 + Mid$(List1.List(List1.NewIndex), 17, 2) * 1000 + Mid$(List1.List(List1.NewIndex), 20, 3)
orario2tmp& = Left$(Label2.Caption, 2) * 3600000 + Mid$(Label2.Caption, 4, 2) * 60000 + Mid$(Label2.Caption, 7, 2) * 1000 + Mid$(Label2.Caption, 10, 3) - orariotmp&
orario1tmp$ = Format$(orario2tmp& \ 3600000, "00") & ":" & Format$(((orario2tmp& - (orario2tmp& \ 3600000) * 3600000)) \ 60000, "00") & ":" & Format$((orario2tmp& - (orario2tmp& \ 60000) * 60000) / 1000, "00.000")
End If
List1.AddItem "Par. " & giro & spazio$ & Label2.Caption & " - " & orario1tmp$
giro = giro + 1
End Sub
Private Sub Command3_Click()
Label2.Caption = "00:00:00,000"
List1.Clear
tempo = 0
End Sub
Private Sub Form_Load()
label1.Caption = Format$(Now, "dddd dd mmmm yyyy hh:mm:ss")
End Sub
Private Sub Timer2_Timer()
label1.Caption = Format$(Now, "dddd dd mmmm yyyy hh:mm:ss")
End Sub
....voglio che arrivi fino a 15 secondi spaccati e poi mi avvii un programma cliccando col pulsante sinistro del mouse su una finestra e premendo F5. AIUTOOOO!!! grazie![]()
![]()
![]()