How to catch Console window content from windows project?

M

Marty

Hi,

I have a DLL that display message in the Console window. My program was
previously compiled as a console project and the output was readable
from the shell/dos window. Now that my project is compiled as a windows
project, I don't have the shell/dos window anymore, how can I get the
previous output to be displayed in a listbox?

I can see it from the output window of VS.NET but I want it from the
application itself.

Regards,
marty
 
R

reviswami78

Why dont you ouput messages to a file?
Or otherwise instead of all the Console.WriteLines just output all
status messages to a stream in code, and have a command line parameter
that decides whether that stream is bound to a file, to the console, or
to some other stream.

That will let you do what you want and also give you a lot of
flexibility.
 

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