GotoXY实施

men*_*raz 2 delphi winapi windows-console delphi-xe

这个问题是我之前发表的题为" 如何修复此过程"将字符串写入控制台屏幕缓冲区的后续问题.

我想在写入任意字符串之前将光标设置为给定的(x,y)位置:

GotoXY(x,y)
SendLn('The harder they come...'); 
Run Code Online (Sandbox Code Playgroud)

如何procedure GotoXY(x, y: integer)实施?

Jam*_*ass 6

一个快速的谷歌揭示

SetConsoleCursorPosition