.net – Disabling Scroll with System.Console.Write


Is it possible to use Console.Write to place a single character at the very bottom right of a typical 80×25 console, without having the console scroll the row up? This is the code that I'm using…

Imports System
Console.SetCursorPosition(Console.WindowWidth-1, Console.WindowHeight-1)

This is not working like I would like it to. Any suggestions or alternatives? I've tested that SetCursorPosition does use a 0,0 coordinate system, already. Using the WindowWidth-1/Height-1 should put me in the lower right corner of the screen… which it does, but then Console.Write is putting the "x" down and continuing on to the next line.

Best Solution

You can try moving the buffer area. For example:

Console.SetCursorPosition(Console.WindowWidth - 1, Console.WindowHeight - 1)
Console.MoveBufferArea(0, 0, 80, 25, 0, 1)
Related Question