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.
Printable View
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.
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.
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
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
TKS Duncan.
Is there same for W98?