上面的写错了哈,应该是
procedure CursorPos()
var
Pos : TPoint;
begin
GetCursorPos(Pos);
if Pos.x = 0 then showmessage('left');
if Pos.x > Screen.Width - 2 then showmessage('right');
if Pos.y = 0 then showmessage('top');
if pos.y > Screen.Height - 2 then showmessage('bottom');
end;
var
procedure CursorPos()
Pos : TPoint;
begin
GetCursorPos(Pos);
if Pos.x = 0 then showmessage('left');
if Pos.x > Screen.Width - 2 then showmessage('right');
if Pos.y = 0 then showmessage('top');
if pos.y > Screen.Height - 2 then showmessage('bottom');
end;
给分,兄弟,我这是第一次在delphi版回答问题呀