C# Console - set cursor position to the last visible line -
I would like to set the cursor position to the last view line. How can I do this?
Cheers,
Pete
Last Line means, you can use a mix of Console.CursorTop
, and Console.WindowHyight
and Console.WindowTop
. Sample code:
using the system; Class test {static wide menu (console); light ("hello"); WriteOnBottomLine ("Below!"); Console "Line" ("there"); } Fixed Zero WriteOnBottomLine (string text) {int x = console Cursor left; Int y = the console Cursor tone; Console.cursor hat = console Windows Top + Console. Windows High - 1; Console.Write (text); // Restore the previous position console .Set Croser Position (X, Y); }}
Note that to find out where it is inside the buffer, take the account of Console.WindowTop
...
Comments
Post a Comment