|
-
March 21st, 2001, 10:25 AM
#1
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
-
March 21st, 2001, 11:17 AM
#2
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
Good Luck,
-Cool Bizs
-
March 22nd, 2001, 08:43 AM
#3
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.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
March 22nd, 2001, 09:19 AM
#4
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]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|