pp with a gui and a cmd line interface

G

Guest

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
 
G

Guest

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.C. \(aka Me\)

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top