隨筆-200  評論-148  文章-15  trackbacks-0
          TScreen和TMonitor.
          這兩者的區別在于TScreen代表的是一個虛擬的桌面,它可以擁有N個Monitor
          ,也就是物理的顯示器.

          這是大富翁上抄下來的代碼 :-)

          //將一個窗體顯示到指定的顯示器上
          procedure SetWindowToMonitor(Form: TCustomForm; //你想操作的窗體
                                       MonitorIndex,      //你想要顯示窗體的顯示
                                                          //  器索引, 0為主顯示
                                                          //  器,1為第二顯示器
                                       Left, Top: Integer //窗體在顯示器上的位置
                                      );
          begin  
            if not Assigned(Form) then Exit;
            if MonitorIndex >= Screen.MonitorCount then Exit;
            with Screen do
            begin
              Inc(Left, Monitors[MonitorIndex].Left);
              Inc(Top, Monitors[MonitorIndex].Top);
            end;
            Form.SetBounds(Left, Top, Form.Width, Form.Height);
          end;
          posted on 2010-08-06 10:23 無聲 閱讀(1583) 評論(0)  編輯  收藏 所屬分類: 職場生活
          主站蜘蛛池模板: 屏东县| 建始县| 广灵县| 景德镇市| 丹阳市| 赤峰市| 兰坪| 招远市| 延川县| 牙克石市| 台山市| 京山县| 广安市| 宾川县| 肇庆市| 泌阳县| 揭阳市| 遂川县| 缙云县| 轮台县| 宁强县| 平潭县| 丰镇市| 深水埗区| 乌海市| 竹山县| 东乌珠穆沁旗| 黄石市| 柯坪县| 洪湖市| 宁夏| 靖江市| 潼南县| 竹北市| 马山县| 镇远县| 白城市| 霍州市| 望江县| 东辽县| 嘉兴市|