如题。。例如有个外部程序 FORM1。 如何获取 Form1 的宽高尺寸, 以及 Form1 在屏幕的位置信息呢?

解决方案 »

  1.   

    var
      R: TRect;
    begin
      GetWindowRect(Form1的句柄, R);
      ShowMessageFmt('宽: %d, 高: %d, 横坐标: %d, 纵坐标: %d', [R.Right-R.Left,
        R.Bottom-R.Top,R.Left,R.Top]);
    end;
      

  2.   

    Form1的句柄 := FindWindow(Form1的类名, Form1的标题);其中Form1的类名, Form1的标题可以使用Spy++得到!得到之后就可以写死在代码里了!
      

  3.   

    同一楼 使用GetWindowRect函数
      

  4.   

    GetWindowRect
      

  5.   

    GetWindowRect很好用的函数,取得的是窗口在屏幕上的坐标
      

  6.   

    如何获得手机屏幕大小呢。getObjectProperty()??