SetConsoleCursor(x, y)
x
and y
. This does not move the physical cursor of the terminal until RefreshConsole()
is called. The position specified is relative to the upper left corner of the window,
which is (0,0).
You must enable advanced console mode using EnableAdvancedConsole() before you can use this function. See EnableAdvancedConsole for details.
EnableAdvancedConsole() w, h = GetConsoleSize() s$ = "Hello World!" SetConsoleCursor((w - StrLen(s$)) / 2, h / 2) ConsolePrintNR(s$) RefreshConsole()The code above prints the string "Hello World" centered in the console.