0

i was writing a c# console application as a homework and i needed to use the Console.SetWindowSize Method...there's only one problem, the command is working, because if i set the cursor position out of the range it return an error, but the window won't change it's size and it just stay how it is...Maybe because the console is set to a certain value by default every time it opens? But how can I get rid of this value? I'm running VC 2022 on Windows 11, is there a way to solve this problem?

Didn't try something at all...i cant find the right option.

  • You first have to make the console buffer big enough so it can store the characters that fill the window. Call [SetBufferSize()](https://learn.microsoft.com/en-us/dotnet/api/system.console.setbuffersize) – Hans Passant Jan 29 '23 at 16:06
  • 1
    Seems like a duplicate of https://stackoverflow.com/questions/75250559/console-application-window-and-buffer-sizes-in-windows-11/75256445 – Tu deschizi eu inchid Jan 29 '23 at 20:20

1 Answers1

0

Try numbers

between 1 and 213 for width

And numbers

between 1 and 49 for height

Console.SetWindowSize(213, 49);