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.
Printable View
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.
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).
Hi,
use the following; change according to your requirment...
X = Shell("C:\Windows\Calc.exe", vbMaximizedFocus)
:-)
Santulan
HI
thanx for the reply. More specifically, I require to be able to shut down the windows prog.