How to catch Console window content from windows project?

  • Thread starter Thread starter Marty
  • Start date Start date
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
 
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.
 
Back
Top