|
调用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;
(出处:DelphiFans.com)
|