catch an application/process start event...
-
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
-
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
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
-
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
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
-
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
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