제가 메인 폼에서 버튼을 클릭하면 폼을 show 하고 각각 모니터로 보내도록 했는데 맞는지 봐주세요..
제가 실행시켜보니까..에러가 나더라구요....
unit uMain;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TfrmMonitorMain = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmMonitorMain: TfrmMonitorMain;
implementation
uses uOneMonitor1,uTwoMonitor2,uThreeMonitor3;
{$R *.dfm}
procedure TfrmMonitorMain.Button1Click(Sender: TObject);
var
a : integer;
begin
frmOneMonitor.Show;
frmTwoMonitor.Show;
frmThreeMonitor.Show;
a := Screen.MonitorCount;
frmOneMonitor.Left := Screen.Monitors[0].Left;
frmOneMonitor.Top := Screen.Monitors[0].Top;
frmTwoMonitor.Left := Screen.Monitors[1].Left;
frmTwoMonitor.Top := Screen.Monitors[1].Top;
frmThreeMonitor.Left := Screen.Monitors[2].Left;
frmThreeMonitor.Top := Screen.Monitors[2].Top;
end;
end.
|