Reputation: 272
I'm using the console for a small console game I'm creating for fun but I've run into a problem.
The console for the game is always having this consistent amount of blank lines at the end of it that just take up space. I can literally make a completely fresh project with nothing in it, run it and it gives the same blank lines. I don't know how to fix this. See image for example.
Upvotes: 0
Views: 526
Reputation: 4587
To get rid of the scrolls and the blank space that you see in the Console
window, you need to make the console screen buffer same as the console window size. Use the code below:
Console.SetBufferSize(Console.WindowWidth, Console.WindowHeight);
Alternatively, if you want to do it manually, for specific console screens such as command prompt, you can get rid of the blank space by going into properties of the window like this:
And then navigate to the Terminal tab and check Disable Scroll-Forward
checkbox from there.
Upvotes: 1