473,387 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Waiting for a process/program to start

JN
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
Jan 10 '06 #1
3 1460
JN wrote:
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
Jan 10 '06 #2
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

"JN" <JN@nospam.com> wrote in message news:43********@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

Jan 10 '06 #3
JN
Chris wrote:
JN wrote:
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

What I am trying to do is have this program monitor what programs are
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?
Jan 11 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Richard | last post by:
Good morning all I need a way in visual basic 6, to start a console process, like ping -A xxx.xxx.xxx.xxx > outputfile.txt and make vb hold its own execution till this process finishes....
7
by: Samantha | last post by:
Hello , I am developping a program for Win98 plateform, and I am stucking with a problem, hope you can help me. I have a program running 2 process : - One process running the Xcopy.exe -...
12
by: Raymond Lewallen | last post by:
How to wait for a process to stop completion is my goal. Obviously, the looping while waiting for the HasExited property is not a solution.. but thats the best I can come up off the top of my...
4
by: Dylan Parry | last post by:
Hi folks, I'm writing a program that needs to execute an external program and wait for it to finish running before it can make use of the output from that program. Specifically, the external...
2
by: Bob | last post by:
I launch Word from within my application (Vs2005, VB) and I would like to make it necessary for the just opened Word to be closed before the rest of my code in the calling sub can execute. How can...
7
by: Bob | last post by:
Process.start("Mydoc.doc") starts Word with the file. I need to wait for Word to be closed before more code can execute in my app. How can I do this? Thanks for any help Bob
5
by: Chris | last post by:
What would be the simplest way to make an app wait for one process to finish before starting the next process? Example /// FileCopy(strPath & "test.mdb", strPath & "live.mdb") Wait(Until...
3
by: bg_ie | last post by:
Hi, I'm starting a process as follows - Process process = new Process(); process.StartInfo.UseShellExecute = false; process.StartInfo.FileName = installValue + "\\Lib\\site-packages\...
9
by: erikcw | last post by:
Hi, I have a cgi script where users are uploading large files for processing. I want to launch a subprocess to process the file so the user doesn't have to wait for the page to load. What is...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.