Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Console app and vb6 form

Hello guys here i am again, I searched a little bit before posting this.
Im not sure what im asking but maybe someon can understand.

Ok I have pre existing console application written by someone else.
It has several txt files to configure settings for the application in directories released with the app.

All i want to do is have the console application run within a form.
And be able to send commands to the console app from a form,
Basicaly i wanting to make a GUI for this application.
I already know how to do all the rest for the config files,Anyone have and answer for me?

It is like a dos promt application btw..

Thank you anyone in advanced.....
[710 byte] By [LABYRNTH] at [2007-11-11 10:15:59]
# 1 Re: Console app and vb6 form
These links might get you started:
Capture the Output of a DOS application
http://www.freevbcode.com/ShowCode.Asp?ID=3957
Advanced Shell Class and Dll
http://www.freevbcode.com/ShowCode.Asp?ID=1282
Ron Weller at 2007-11-11 17:22:53 >
# 2 Re: Console app and vb6 form
Here's another:
http://www.vbforums.com/showthread.php?t=364219
Phil Weber at 2007-11-11 17:23:53 >
# 3 Re: Console app and vb6 form
Thanks guys,

Im still now sure what to use here.

This is exaclty what i want to do,
==========================================================
"To write a graphical user interface, or GUI, around a command line program is probably something every VB programmer at some point have had the need to do. Doing that for a command line program (from here on simply called CmdApp) that takes a bunch of parameters and switches on the command line and then does its job and exit is very easy to do. We would just create a Form with checkboxes, option buttons, and/or textboxes in which the user can enter these command line options and then we simply call the Shell function"
==========================================================

But the one link that said this is capturing the output of the application, im not wanting to do that at all.

Elaberate a little more please.
LABYRNTH at 2007-11-11 17:24:51 >
# 4 Re: Console app and vb6 form
So you want to create a GUI so that the user can set all the config options, then shell the console app, correct? But you don't want to display the output of the console app in your GUI? You just want it to run in a standard console window?
Phil Weber at 2007-11-11 17:25:56 >
# 5 Re: Console app and vb6 form
So you want to create a GUI so that the user can set all the config options, then shell the console app, correct? But you don't want to display the output of the console app in your GUI? You just want it to run in a standard console window?

I want to create a GUI , that has the console app on the form. Not seperate.
But i want to send commands to the console app via controls on the form
I dont think vb has to read output from it at all, the console app displays this already.

1. Form with the Console on it. and closes with the form when it is closed.
2. Able to send commands to the console via controls from the form.

The config files are nothing i can do this part.
LABYRNTH at 2007-11-11 17:26:55 >
# 6 Re: Console app and vb6 form
You can't run or integrate the console application window directly from the Visual Basic Form. You have to create your own console interface, as Ron and Phil mentioned, and pipe that information to and from the DOS app.

The only other alternative is to shell to the console app and work with it from within it's own window.
pclement at 2007-11-11 17:27:56 >
# 7 Re: Console app and vb6 form
I got it to work, Thanks.
LABYRNTH at 2007-11-11 17:28:59 >