Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

killing off an asynchronuos process and vb commands

Status
Not open for further replies.

jmcbride

Programmer
May 16, 2000
5
GB
I have been trying to perfect a piece of VB6 that allows me to start up an underlying process ( in this case telnet) and then when it has run successfully automatically kill it off.<br><br>I have come across two problems <br><br>[1] when I run the program it starts up and connects to telnet and will successfully carry out the required work but because it has to run from a window it then finishs by bringing up a messagebox with a prompt for ok. Which means the user has to click OK and then close the telnet window as well. I want to close the messagebox and telnet window without the user having to do it.<br><br>[2] I tried to be clever and used API's to resolve this problem. First I got the handle of the telnet window and then I used the SendMessage API to close it.<br>BUT because the telnet session is asynchrnous the vb program starts up telnet and then carries on down through the rest of the script getting to the SendMessage before the telnet session has successfully finished. Somehow I need to delay&nbsp;&nbsp;the SendMessage kicking off or even stopping it until telnet is finished.<br><br>Any suggestion welcomed!!! <br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top