I've got an application that I would like to have both a GUI and a command
line interface. It is easy enough to check for command line arguments. The
proplem is that if I set my project output type to "Windows Application",
Console.Writeline doesn't write back to the console (it writes back to the
IDE when debugging). But if I et my project output type to "Console
Application", whenever I start my app from the Start Menu, I get a console in
addition to my GUI.
Is there a way to work around either of these situations?
I need to:
A) find a way to write to the console in a windows application
or
B) stop the console from appearing in a console application
thanks
AMercer - 27 Jan 2006 22:26 GMT
> I need to:
> A) find a way to write to the console in a windows application
If you write to the console (in vb, Console.Write("whatever")) in a windows
app, you will see the console output if you pipe stdout to 'more'. Assume
your app name is xxx.exe, at the command prompt type xxx | more.
C.C. (aka Me) - 28 Jan 2006 00:10 GMT
This may also be an architecture issue. Maybe you should create an set of
classes that implement all the behavior and then create separate console/GUI
frontends using those classes. You would end up with 2 separate .EXE files
but it may be better in the long run?

Signature
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Charles Cox
VC/VB/C# Developer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> I've got an application that I would like to have both a GUI and a command
> line interface. It is easy enough to check for command line arguments. The
[quoted text clipped - 15 lines]
>
> thanks