Click to See Complete Forum and Search --> : Shell command


Chris Rowe
October 8th, 1999, 08:28 AM
I have a requirement to run a windows Prog from a vb5 App and depending on certain criteria close or keep the windows Prog running. I do not wish to resort to sendKeys.
Does anyone have any ideas.
Thanx in adv.

Lothar Haensler
October 8th, 1999, 08:42 AM
to start a program you can use:
- the VB shell command
- the CreateProcess API
- the ShellExecute(Ex) API

to wait for the end of the program use the CreateProcess/WaitForSingleObject API combination.
To terminate a process use the TerminateProcess API (carefully).

santulan
October 8th, 1999, 09:29 AM
Hi,

use the following; change according to your requirment...

X = Shell("C:\Windows\Calc.exe", vbMaximizedFocus)




:-)

Santulan

October 12th, 1999, 05:14 AM
HI

thanx for the reply. More specifically, I require to be able to shut down the windows prog.