ciao, ho creato un programma che segna su un .txt ora di avvio, spegnimento ed utilizzo totale del computer: basta semplicemente inserirlo in esecuzione automatica ed il gioco è fatto.
codice:
Public ora As Date
Private Sub Form_Load()
Form1.Visible = False
Open "c:\utilizzo.txt" For Append As #1
Print #1,
Print #1, "------------------------------------------"
Print #1, "Avvio:", Time, Date
Close #1
Timer1.Interval = 1000
Timer1.Enabled = True
ora = "00:00:01"
Label1.Caption = ora
End Sub
Private Sub Form_Unload(Cancel As Integer)
Open "c:\utilizzo.txt" For Append As #1
Print #1,
Print #1, "Spegnimento:", Time, Date
Print #1,
Print #1, "Utilizzo totale:", ora
Print #1, "------------------------------------------"
Close #1
Unload Me
End Sub
Private Sub Timer1_Timer()
ora = ora + "00:00:01"
Label1.Caption = ora
End Sub
Il segondo punto non mi è chiato... potresti spiegarti meglio?