I’ve set the buffer size to the window size to get rid of the scroll bar. Now, I’m trying to fill the console with a value, but there is always a new blank line added to the end, which causes the first line to be cleared from the buffer.
I know why it’s happening, but is there any way that I can prevent it?
I’ve tried moving the buffer area, but as I said, the first line of the buffer is cleared when the blank line is added, so that just creates a blank line at the top.
The .NET console just streams into the buffer, which is probably not what you want. You’ll need to P/Invoke into the Windows API to have full control over the console.
In particular, check out WriteConsoleOutput. It allows you to treat the console as a grid of “pixels”, and write to a specific block of them.