0

I am wanting to have a console application which is used with a WinForm application. I want to be able to write output to the console from the WinForm Application(C#).

An example of what I am trying to achieve..

I want to be able to write & use Console.WriteLine("Some Text"); from a WinForm application.

Sorry for the short description of what I'm looking for but I thought I would make it short and sweet.

This is for C# and I've looked all over the internet but none of them work :(

Thanks.

unsworthpp
  • 45
  • 1
  • 6
  • Is there a specific reason you want the WinForms application to invoke the Console application? Do you not have access to the source code of the Console application to just share its logic with the WinForms application? – David Jan 27 '14 at 18:44
  • Just change the program type from Windows to Console Application in the project properties. – Alex F Jan 27 '14 at 18:47

1 Answers1

0

Almost mission impossible, but if you are willing to risk it: Show Console in Windows Application?

It requires some extreme Win32 magic and is very, very fragile. I would prefer to not do it. You can use the Debug class to output some debugging information.

Community
  • 1
  • 1
Martin Zikmund
  • 38,440
  • 7
  • 70
  • 91