Sinisterly
[VB.Net]Get computer running hour(s) and minutes - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Visual Basic & .NET Framework (https://sinister.ly/Forum-Visual-Basic-NET-Framework)
+--- Thread: [VB.Net]Get computer running hour(s) and minutes (/Thread-VB-Net-Get-computer-running-hour-s-and-minutes)



[VB.Net]Get computer running hour(s) and minutes - 1234hotmaster - 05-02-2011

All credits go to me worked 10 minutes on it.

Code:
Code:
Public Function GetPCRunningHours() If Environment.TickCount \ 60000 >= 1000 Then Return (Environment.TickCount \ 60000).ToString.Insert(2, " Hours ").Insert(11, " Minutes") Else Return (Environment.TickCount \ 60000).ToString.Insert(1, " Hours ").Insert(10, " Minutes") End If End Function



Usage:
Code:
MsgBox("Computer Has been running for " & GetPCRunningHours)



RE: [VB.Net]Get computer running hour(s) and minutes - Coder-san - 05-02-2011

Nice, good work. Smile


RE: [VB.Net]Get computer running hour(s) and minutes - H3ROiN - 05-02-2011

nice , it will really help me in my AIO tool [: .