Article View: comp.os.ms-windows.programmer.misc
Article #2071Visual Basic Question: How to Kill "foreign" task
From: Mark O. Chadwick
Date: Mon, 16 Nov 1992 18:59
Date: Mon, 16 Nov 1992 18:59
29 lines
1249 bytes
1249 bytes
Hi,
I'm trying to write a program that does the following:
Invokes an external program, not related to the one I'm writing
(For example, we'll assume I'm trying to run sol.exe)
When certain conditions exist, it terminates that program.
The way I do it now is to AppActivate "Solitaire"
then SendKeys "%{F4}" (Alt-F4) to kill it.
This works great if the program is still running, but
if the user has exited solitaire before the conditions are
met, some OTHER program gets terminated (sometimes
PGM MGR itself!)
Is there some way to use the number VBasic returns
when you Shell the program?
(i.e. something=Shell("C:\win\sol.exe",1) ???
HELP!
(Please email-I don't do a lot of windows pgming, and
don't have time to peruse this group a lot) THANKS!
--
---
Mark "Emerson" Chadwick -- ncc1701@acm.rpi.edu chadwickmo@space.laafb.af.mil
Technical Details
Message-ID:
<m#w10cc@rpi.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!caen!zaphod.mps.ohio-state.edu!rpi!ncc1701Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!sparky!uunet!caen!zaphod.mps.ohio-state.edu!rpi!ncc1701 From: ncc1701@madoka.its.rpi.edu (Mark O. Chadwick) Subject: Visual Basic Question: How to Kill "foreign" task Message-ID: <m#w10cc@rpi.edu> Nntp-Posting-Host: madoka.its.rpi.edu Reply-To: ncc1701@acm.rpi.edu Date: Mon, 16 Nov 1992 18:59:27 GMT Lines: 29