Hi @Mr.Postal , Welcome to Microsoft Q&A,
In Windows 11, the default console experience is Windows Terminal instead of the old classic console (ConHost). Windows Terminal does not support direct control of the window size or fullscreen state through ShowWindow
, because it is a modern multi-tab terminal.
One feature of Windows Terminal is that it will set a special environment variable WT_SESSION
. You can check this variable to determine if you are running in Windows Terminal.
If you want to use the classic ConHost console on Windows 11, you can change the system default settings to force the use of the classic console. Of course, this is not convenient to perform on the client machine, you can test it yourself on the development machine.
For now, at present, Windows Terminal does not support resizing through the console application. For an alternative method, see How to Resize a Console App in C# - Windows Terminal
Best Regards,
Jiale
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.