|
-
Oct 8th, 2000, 05:24 PM
#1
I was wondering if there was a way to get the total amount of time the computer has been running. When I say total, I mean the combined amount since the operating system was installed.
-
Oct 8th, 2000, 09:33 PM
#2
Fanatic Member
GetTickCount will get the time since windows was loaded. How about the time since the Windows Folder Was Modified, don't have code now, but i can tell you how
Note: Funcitons in Italics are API's, functions in Bold are built into VB
- Open the Windows Folder With CreateFile
- Use GetFileTime to get the time created
- Use FileTimeToLocalFileTime to get it local
- Use FileTimeToSystemTime to get into structure
- Put into a Date with DateSerial
- Use DateDiff to compare result of above with Now
Sorry, that i don't have code now
GWDASH
[b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]
-
Oct 9th, 2000, 08:38 PM
#3
Yeah, I have gotten ideas like that from other people. There is a problem with that. Wouldn't it only tell you how long you have had your computer with Windows on it? Not how long your computer has been on with Windows on it.
-
Oct 9th, 2000, 09:14 PM
#4
Fanatic Member
The only way I can think of is to use GetTickCount and add the times up, but that would have to be done on loggoff and would only start counting now. Just Curious, why do you need this?
GWDASH
[b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]
-
Oct 12th, 2000, 09:02 PM
#5
I made a program on my website for free distrobution. Just wanted to know if it were possible.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|