Write to console window from a Windows Forms App

J

Josh

Iv created a program that has many command-line arguments. I want to
beable to display help information in the console window that the
person typed the command into. I cant do this unless I switch the
project output type to a console application and I dont want to do
that. It wouldnt work the way I want anyways. I just need a way to
display text to the console window that the program was launched from.
 
M

Michael Nemtsev

Hello Josh,

use WinAPI AttachConsole

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/attachconsole.asp

J> Iv created a program that has many command-line arguments. I want to
J> beable to display help information in the console window that the
J> person typed the command into. I cant do this unless I switch the
J> project output type to a console application and I dont want to do
J> that. It wouldnt work the way I want anyways. I just need a way to
J> display text to the console window that the program was launched
J> from.
J>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 

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