C++ Builder中获取桌面的大小

void   __fastcall   TForm1::Button1Click(TObject   *Sender) 
{ 
    TRect   hRect; 
    SystemParametersInfo(SPI_GETWORKAREA   ,   0,   &hRect,   0); 
    ShowMessage(IntToStr(hRect.Top)   +   "   "   +   IntToStr(hRect.Left)   +   "   "   +   IntToStr(hRect.Bottom)   +   "   "   +   IntToStr(hRect.Right)); 
}
posted @ 2011-03-17 21:12  luoshupeng  阅读(617)  评论(0编辑  收藏  举报