怎么取得屏幕最大化时的长和宽,要求用函数表示?

解决方案 »

  1.   

    用函数?
    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写错了