473,669 Members | 2,432 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1475
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.co m> wrote in message news:43******** @news.sentex.ne t...
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
5624
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. Using Shell() doesnt work, it starts a process, then just carries on working.
7
3348
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 - When the first process is finished, it runs another Exe process (HHC.exe) The code is below:
12
2364
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 head. Natuarally it will not work. I expect it to use up all resources looping, which will not allow the process to complete. The process takes about 60 seconds, because the .bat file it is calling is rebuilding mulitple .NET solutions and projects...
4
8406
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 program converts from one file format to another, and is something that I can't do natively :( So what I need to figure out is how to: a) Start the external program, with parameters
2
1770
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 I do this? Thanks for any help Bob
7
7329
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
3206
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 FileCopy is Done) <---------------That is what I'm looking for Shell(someapp.exe)
3
2867
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\ \pythonwin\\Pythonwin.exe"; process.StartInfo.Arguments = "/run " + script;
9
6441
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 the correct way to launch subprocess without waiting for the result to return? Thanks!
0
8465
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8809
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8588
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8658
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6210
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4386
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2797
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.