支持多显示器

I

import

Unregistered / Unconfirmed
GUEST, unregistred user!
TScreen->Monitors *************
在第二显示器上开一个窗口
 
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;
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
559
import
I
I
回复
0
查看
575
import
I
顶部