
Length of time shell is active
You can use a timer that checks every now and than wether the app
is running.
You check if its running by using the function getmodulehandle.
And with the retrieved handle you can see with getModuleUsage how
many of them are running. These are API functions. Use the
following declare statement:
Declare Function GetModuleHandle Lib "Kernel" (ByVal lpModuleName
As String) As Integer
Declare Function GetModuleUsage Lib "Kernel" (ByVal hModule As
Integer) As Integer
Use the following statement in your code:
handle = GetModuleHandle ("Your apps exe name")
If the handle is anything different from 0 then the App is running
atleast once
The statement:
Times = GetModuleUsage (handle)
Times gives the number of times the app is running