1

I'm building a windows application, but I need also the features of the console.

If I change the output type from Windows Aapplication to Console Application it works fine, but it shows always the console.

It's possible enabling the console by code only in certain situations?

thanks in advance!

ghiboz
  • 7,863
  • 21
  • 85
  • 131
  • 1
    possible duplicate http://stackoverflow.com/questions/472282/show-console-in-windows-application – Sriram Sakthivel Jul 16 '13 at 08:18
  • 1
    thanks! it works! `AllocConsole(); Console.WriteLine(@"hello. It looks like you double clicked me to start AND you want console mode. Here's a new console."); Console.WriteLine("press any key to continue ..."); Console.ReadLine();` – ghiboz Jul 16 '13 at 09:13

1 Answers1

1

Perhaps this can be of any help:

How to run a C# console application with the console hidden

The person asking the question was running a WinForms app where he executed other things through a console application without showing it. Seems similar to your situation. Hope this helps! :)

Community
  • 1
  • 1
Abbas
  • 14,186
  • 6
  • 41
  • 72