Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. catch an application/process start event...

catch an application/process start event...

Scheduled Pinned Locked Moved C#
questioncsharphelp
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    batmanAgen
    wrote on last edited by
    #1

    hi guys, need help...:) i need to know if a specific application (eg Microsoft Word etc) is opened... how can i catch or know that event was fired programmatically? tnx... btw im using c#... -- modified at 11:05 Wednesday 11th January, 2006

    M K 2 Replies Last reply
    0
    • B batmanAgen

      hi guys, need help...:) i need to know if a specific application (eg Microsoft Word etc) is opened... how can i catch or know that event was fired programmatically? tnx... btw im using c#... -- modified at 11:05 Wednesday 11th January, 2006

      M Offline
      M Offline
      mikailcetinkaya
      wrote on last edited by
      #2

      it is easy if your program is working when one tries opening any app. make a system tray docking application and loop through processes that are loaded; or subscribe to processpool events. for more info search at codeproject for singleton pattern sample where it looks for a process with the same name. your code is similar... or by vs toolz for office (vsto addin) for vs2005 has many plugin features.(accessible on msdn office developer center u need licensing...) choose whatever uwant Mikail Çetinkaya . The C# DEveloper

      C 1 Reply Last reply
      0
      • M mikailcetinkaya

        it is easy if your program is working when one tries opening any app. make a system tray docking application and loop through processes that are loaded; or subscribe to processpool events. for more info search at codeproject for singleton pattern sample where it looks for a process with the same name. your code is similar... or by vs toolz for office (vsto addin) for vs2005 has many plugin features.(accessible on msdn office developer center u need licensing...) choose whatever uwant Mikail Çetinkaya . The C# DEveloper

        C Offline
        C Offline
        coolestCoder
        wrote on last edited by
        #3

        It can be done by writing your own service. A windows service can be configured to automatically start at system boot. then the service can know about any other service running on the same / remote computer. A tutorial is available for writing services in the MSDN library. Search for "Writing Windows Services". There is also a sample program for this type of requirement in the C# samples directory. Or you can download that sample from msdn.microsoft.com. Find more help about these classes - ServiceController Process.GetProcesses(strMachineName) this method returns Process[] which can be used to know information about the process ! Anant Y. Kulkarni

        1 Reply Last reply
        0
        • B batmanAgen

          hi guys, need help...:) i need to know if a specific application (eg Microsoft Word etc) is opened... how can i catch or know that event was fired programmatically? tnx... btw im using c#... -- modified at 11:05 Wednesday 11th January, 2006

          K Offline
          K Offline
          Koushik Biswas
          wrote on last edited by
          #4

          I cannot say whether there is an "event" way of solving this. But what you can do is you can spawn a separate thread from your application, which will periodically call Process.GetProcessesByName() method, and you can pass in the process name for Microsoft Word (or any other process you want to wait on). Definitely if you receive an "event" that would be less complicated, but I doubt whether that is at all possible. No application will let you know that it has started - YOU have to find that out! Koushik Biswas

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups