本文整理自网络,侵删。
调用Windows API 函数 SystemParametersInfo 传送SPI_GETWORKAREA 参数和矩形结构的地址来接收坐标。
例子:
procedure TForm1.Button1Click(Sender: TObject);
var
hRect : TRect;
begin
SystemParametersInfo(SPI_GETWORKAREA,0,@hRect, 0);
ShowMessage(IntToStr(hRect.Top)
+ ' ' + IntToStr(hRect.Left)
+ ' ' + IntToStr(hRect.Bottom)
+ ' ' + IntToStr(hRect.Right));
end;
相关阅读 >>
Delphi application.processmessage作用
Delphi中exit,abort,break,continue,halt,runerro 的区别
更多相关阅读请进入《Delphi》频道 >>