简体   繁体   中英

Is there any way to hide the console by overridding the close button?

I am making a C# WPF application. I can hide/show the console throught C imported functions (as in Show/Hide the console window of a C# console application ). Is there any way to hide the console by overridding the close button ?

You should consider using Console.SetOut and show the output on a window instead: Console.SetOut

The best approach however is to use some decent logging mechanisms instead of the Console.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM