用函数? API函数是可以GetDeskTopWindow获得桌面句柄,然后用GetWindowRect就可以了;Function GetScreenSize:TRECT; begin GetWindowRect(GetDesktopWindow,Result); end;或者写成Function GetScreenSize:TRECT; var DeskRect:TRect; begin GetWindowRect(GetDesktopWindow,DeskRect); Result:=DeskRect; end;应该是这样,可能我吧Trect写错了
API函数是可以GetDeskTopWindow获得桌面句柄,然后用GetWindowRect就可以了;Function GetScreenSize:TRECT;
begin
GetWindowRect(GetDesktopWindow,Result);
end;或者写成Function GetScreenSize:TRECT;
var
DeskRect:TRect;
begin
GetWindowRect(GetDesktopWindow,DeskRect);
Result:=DeskRect;
end;应该是这样,可能我吧Trect写错了