Controlling other application from VB
Hi,
Here I have code in the button click event to close the console window, which is run by the Shell("application",mode) function in VB from other event .Using AppActivate(taskid,mode) function, I activate console window using its task id,which is returned from Shell function and I close it by sending Control+C(^C) through SendKeys (KeysCombination,mode) statement. This is working fine in Windows NT platform. But the same code on Windows'9X does not close the console window. what would be the problem?
How do I solve it? Please help me..
regards
Gnana Reddy
Re: Controlling other application from VB
Can you send "EXIT{ENTER}" instead? We know that by typing EXIT command, will exit any DOS box automatically.
-Cool Bizs
Re: Controlling other application from VB
or: make a .bat file for launch your dos (console) application and add at last line the instruction
exit
then shell to the .bat file
Hope this help
Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
Re: Controlling other application from VB
If you make the bat file, go to the properties and check the box 'Close window on exit'
Iouri Boutchkine
[email protected]