DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Bilgisayar ne kadar açık kaldıgı ve internetde ne kadar zaman geçirdiğim süreyi tutmak istiyorum bu mümkünmüdür.
Private Declare Function GetTickCount Lib "kernel32" () As Long
Sub aciksure()
Dim h As Single, M As Single, S As Single, MS As Single
Dim strH$, strM$, strS$, strMS$
MS = GetTickCount()
MS = MS / 1000
h = Int(MS / 3600)
MS = MS - h * 3600
M = Int(MS / 60)
MS = MS - M * 60
S = Int(MS)
MS = Int((MS - S) * 10)
strH = CStr(h)
strM = Format(CStr(M), "##00")
strS = Format(CStr(S), "##00")
strMS = Format(CStr(MS), "##00")
MsgBox "Bilgisayarın açık kaldığı süre " & Chr(10) & Chr(10) & _
strH & ":" & strM & ":" & strS & ":" & strMS, vbInformation, "uyarı"
End Sub
Teşekkürler hocam bu kodu userfrom userinde label veya textbox nasıl gösterebiliriz.
Private Declare Function GetTickCount Lib "kernel32" () As Long
Private Sub UserForm_Activate()
Dim h As Single, M As Single, S As Single, MS As Single
Dim strH$, strM$, strS$, strMS$
MS = GetTickCount()
MS = MS / 1000
h = Int(MS / 3600)
MS = MS - h * 3600
M = Int(MS / 60)
MS = MS - M * 60
S = Int(MS)
MS = Int((MS - S) * 10)
strH = CStr(h)
strM = Format(CStr(M), "##00")
strS = Format(CStr(S), "##00")
strMS = Format(CStr(MS), "##00")
Label1 = strH & ":" & strM & ":" & strS & ":" & strMS
End Sub
Hocam sanaiyesi ilerliye bilirmi rica etsem.
Private Declare Function GetTickCount Lib "kernel32" () As Long
Private Sub Timer1_Timer()
Dim h As Single, M As Single, S As Single, MS As Single
Dim strH$, strM$, strS$, strMS$
MS = GetTickCount()
MS = MS / 1000
h = Int(MS / 3600)
MS = MS - h * 3600
M = Int(MS / 60)
MS = MS - M * 60
S = Int(MS)
MS = Int((MS - S) * 10)
strH = Format(CStr(h), "##00")
strM = Format(CStr(M), "##00")
strS = Format(CStr(S), "##00")
strMS = Format(CStr(MS), "##00")
Label1 = strH & ":" & strM & ":" & strS
End Sub
Private Sub UserForm_Activate()
Timer1.Enabled = True
Timer1.Interval = 1000
End Sub
Dediğiniz gibi yaptım fakat Timer1 de 'varible not defined' hatası verdi
Tamam çok ama çok teşekkür ederim.Allah razı olsun Halit abicim.