|
-
Feb 22nd, 2002, 11:08 AM
#1
Thread Starter
New Member
Timers
Dear friends,
I want to know how can I retrieve the time an application is openned i.e. how long MSWord is in use in a session.
Thanks.
-
Feb 22nd, 2002, 04:26 PM
#2
Store the time in a variable when your application starts. Then, when you want to check the time, subtract the start time from the current time.
-
Feb 25th, 2002, 07:44 AM
#3
Thread Starter
New Member
Maybe I din't explain well the question. I just want to trap every time any app on my computer starts i.e. if an user starts msword or msexcell or solitaire, I want to know how to get the time it started.
Thanks
-
Feb 25th, 2002, 08:49 AM
#4
Frenzied Member
If you are on Win2K or WinXP you can use the GetThreadTimes API call:
VB Code:
Private Declare Function GetThreadTimes Lib "kernel32" (ByVal hThread As Long, lpCreationTime As FILETIME, lpExitTime As FILETIME, lpKernelTime As FILETIME, lpUserTime As FILETIME) As Long
See the ApiThread class for how this is done...
Hope this helps,
Duncan
-
Feb 25th, 2002, 09:11 AM
#5
Thread Starter
New Member
TKS Duncan.
Is there same for W98?
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
|