program MouseInput;
Uses WinCrt,Mouse, sysutils,Graph;
Var
GraphicsDriver, GraphicsMode,
ErrCode : smallint;
x, y: word;
Begin
x:=GetMouseX;
Y:=GetMouseY;
Writeln('Initialising Graphics, please wait...');
GraphicsDriver := Detect;
InitGraph(GraphicsDriver, GraphicsMode,'');
x := GetmouseX();
y := GetmouseY();
OuttextXY(0,0,inttostr(x));
readln();
end.
我有这个代码,但是出现了这个语法错误:1 / 1 mouse.pas 致命:语法错误,预期为单位,但找到了程序,但这是一个程序而不是一个单元?
如果我将鼠标更改为 WinMouse,它会消失,但会抛出其他错误,提示找不到标识符 GETMOUSEX 和 GETMOUSEY