Solved

How long has Windows been running?

Posted on 1998-10-05
1
149 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

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…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
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…
Suggested Courses
Course of the Month6 days, 7 hours left to enroll

634 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