Results 1 to 5 of 5

Thread: Monitoring Application usage

Hybrid View

  1. #1

    Thread Starter
    Hyperactive Member Blinky Bill's Avatar
    Join Date
    Mar 2002
    Location
    Happily munching on the greenery in your garden
    Posts
    349

    Monitoring Application usage

    I want to monitor the times that apps are opened and closed as well as what webpages have been visited on my computer and i don't really know how to go about it. I tried searching for some info, but couldn't find anything. I know that i'll need an app that runs invisibly, that either polls every 5 seconds or so, or i'll need some API that i've never heard of.

    Anyway, that's what i want to do, so if anyone could give me some clues, links, tips, code or anything, it would be appreciated.
    We don't know what's wrong. . . So the best bet might be to remove something surgically.

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    ok, from the sounds of it you need to learn how to do the following things:

    * gets a list of running programs - search this forum for "task list"

    * gets addresses of any internet browser windows - I'll post a link or code in a minute...

    * runs hidden (so the user can't stop it easily) - search this forum for "run as service"


    I'm guessing that you can work out the five second bit

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    right then, Internet addresses.. this will only work with Internet Explorer:

    you need a reference to M$ HTML object library (mshtml.tlb)
    VB Code:
    1. Dim SWs As New SHDocVw.ShellWindows
    2. Dim IE As SHDocVw.InternetExplorer
    3. Dim Doc As Object
    4.  
    5.         For Each IE In SWs
    6.         'SWs enumerate the Shell Windows
    7.             Set Doc = IE.Document
    8.             If TypeOf Doc Is HTMLDocument Then
    9.  
    10. MsgBox IE.LocationURL
    11. 'store  IE.LocationURL here, to a file/the registry etc..
    12.  
    13.             End If
    14.         Next IE

  4. #4

    Thread Starter
    Hyperactive Member Blinky Bill's Avatar
    Join Date
    Mar 2002
    Location
    Happily munching on the greenery in your garden
    Posts
    349
    si_the_geek,
    I tried to run your code, but i get a message, User Defined Type not Defined on this line

    VB Code:
    1. Dim SWs As New SHDocVw.ShellWindows

    Can you please post the type for me?

    Thanx
    We don't know what's wrong. . . So the best bet might be to remove something surgically.

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    It seems like i didn't post both references you need -

    M$ Internet Controls (shdocvw.dll)

    M$ HTML Object Library (mshtml.lib)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width