Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2006

Tip: Looking for answers? Try searching our database.

pp with a gui and a cmd line interface

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eric - 27 Jan 2006 21:37 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.