22 Ocak 2012 Pazar

Program kaç kez çalıştırıldı

Posted by Unknown On 13:16 No comments

Program kaç kez çalıştırıldı. Süper bir ek özellik programlarınız için

Kod;

PHP Code:
Option Explicit

Private RunTimes As Long
Private RunDate As Date

Private Sub Form_Load()
RunTimes = GetSetting("CounterApp", "Counts", "NumTimes", 0) + 1
RunDate = GetSetting("CounterApp", "Counts", "LastTime", Now)
If RunTimes > 1 Then
Label1.Caption = "Bu program " & _
Format$(RunTimes) & " defa çalıştırılmıştır."
Label2.Caption = "Son çalıştırılma zamanı...=" & _
Format$(RunDate) & "."
Else
Label1.Caption = "Bu program ilk defa çalıştırılıyor."
End If

End Sub

Private Sub Form_Unload(Cancel As Integer)
SaveSetting "CounterApp", "Counts", "NumTimes", RunTimes
SaveSetting "CounterApp", "Counts", "LastTime", Now

End Sub 

0 yorum:

Yorum Gönder