[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 154
  • Last Modified:

How long has Windows been running?

How do I find out how long Windows has been running on a user's machine with VB? (like which API function returns it) Like in the About tab of More Properties?
0
chrisbolt
Asked:
chrisbolt
1 Solution
 
staticsnowCommented:
To find out the number of milliseconds that hae elasped since windows was started, use the API functionGetTickCount. It returns a long containing the elapsed time in milliseconds.

                 Declare Function GetTickCount& Lib "kernel32" ()                  

                 With this function, you can calculate the number of minutes that have elapsed since startup.
                 There are 1000 milliseconds in a second. This function replaces the Win16
                 GetCurrentTime function.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now