|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Waiting for a process/program to startHello,
I am trying to write a program or service that will run in the background and wait for a particular program to start, when it does I want something else to occur such as a message box. I am not sure how to do the waiting game (sleep is no good, neither is a loop). Any help is appreciated. JN JN wrote:
> Hello, Why is sleep no good?> > I am trying to write a program or service that will run in the > background and wait for a particular program to start, when it does I > want something else to occur such as a message box. I am not sure how to > do the waiting game (sleep is no good, neither is a loop). > Any help is appreciated. > > JN Chris Chris wrote:
Show quoteHide quote > JN wrote: What I am trying to do is have this program monitor what programs are > >> Hello, >> >> I am trying to write a program or service that will run in the >> background and wait for a particular program to start, when it does I >> want something else to occur such as a message box. I am not sure how >> to do the waiting game (sleep is no good, neither is a loop). >> Any help is appreciated. >> >> JN > > > Why is sleep no good? > > Chris being used and once a particular one is started, I would like a message box to open. If I cause this program to sleep it may miss the starting of a program, I am correct in this thinking? Why not do this asynchronously by firing the process to start on another
thread and passing the delegate of the method which will open the message box when the process completes? There are differences in how you do this in 1.x vs 2.0, so make sure to research the right areas. There should be plenty of examples for asynchronous programming available online and in the help files. Jim Show quoteHide quote "JN" <JN@nospam.com> wrote in message news:43c402d3$1@news.sentex.net... > Hello, > > I am trying to write a program or service that will run in the background > and wait for a particular program to start, when it does I want something > else to occur such as a message box. I am not sure how to do the waiting > game (sleep is no good, neither is a loop). > Any help is appreciated. > > JN
Create a custom collection
How to re-acquire the Text from a combo box Anyone used Socketwrench? Problem With Insert into MySQL DB using VB.Net 2005 COBOL Packed decimal converter to VB decimal Capture and redirect TCP traffic updating listbox with database update computer properties in vb.net filewatcher file modification What mvp use for printing |
|||||||||||||||||||||||