Solved

How long has Windows been running?

Posted on 1998-10-05
1
143 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

770 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