Console App

  • Thread starter Thread starter daveL
  • Start date Start date
D

daveL

Is there a Way to open and close console window on
demand, nother words control the console from with in the application

DaveL
 
daveL said:
Is there a Way to open and close console window on
demand, nother words control the console from with in the application

There are some Win32 API functions that does that and you can
call them from C#.

I have some code somewhere if you are interested.

Arne
 
I seem to recall there's a way to minimize, restore, and maximize the
console window... How do you get the window handle to the console?  From
there, it should be easy.

The WinAPI function for that is, perhaps surprisingly, called
"GetConsoleWindow".

Functions to create and close a console in the process are
"AllocConsole" and "CloseConsole", respectively.
 
Back
Top