Solved

How long has Windows been running?

Posted on 1998-10-05
1
141 Views
Last Modified: 2010-04-30
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
Comment
Question by:chrisbolt
1 Comment
 

Accepted Solution

by:
staticsnow earned 100 total points
ID: 1438330
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
vba find the last empty column 10 88
String manipulation in Visual Basic 7 58
Access query that references subform 5 43
Microsoft Access combo box help 2 37
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now