Click to See Complete Forum and Search --> : Console mode
NerveJam
Jun 13th, 2000, 06:06 PM
Right, here goes: I want to write VB programs that behave like QBASIC did. I want to PRINT, and INPUT from the CMD line. I've got the console.bas code, and this is fine, BUT it launches a new console instance. I want to run the program from a CMD line, and have all I/O happen in THAT instance. I'm new to VB, so any help would be appreciated...
You want to run the program from the CMD lines? You mean like when you type Myprog.exe in the DOs prompt and it runs MyProg. Is that what you want to do?
Please clairify.
To run the the DOS prompt, just use the Shell command.
RetVal = Shell("C:\Command.com", 1)
NerveJam
Jun 18th, 2000, 03:07 PM
That just starts a new shell... How do I display output (and request input) on the SAME command line?
Judd
Jun 18th, 2000, 09:38 PM
Try using the console 'Start' command with the /b option
NerveJam
Jun 25th, 2000, 03:25 PM
Pardon? I was using the AllocConsole function. This starts a new console window, but all I'm after is the ability to run a program from a CMD window, then display and input in THAT window....
Judd
Jun 25th, 2000, 04:17 PM
You must be able to send commands to it?? No??
The 'Start' command can launch a program in its own window.(it actually starts another console, but displays it in the same window).
Crazy D
Jun 25th, 2000, 05:08 PM
Check out the Articles section, a while ago there was an article how to do a console app in VB.
Yes, but i don't think they explained what he is trying to do.
parksie
Jun 26th, 2000, 02:31 AM
what you want is to open stdout as a file...not sure how in VB.
NerveJam
Jun 27th, 2000, 05:42 PM
Exactly that...
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.