title: How can I display a form on a secondary monitor?
body: <p>I am writing a screensaver in Delphi. I want is to display a TpresentationFrm on each monitor, fullscreen. To this end, I have written the following (incomplete) program:</p>
  
  <pre><code>program ScrTemplate;
  
  uses
    ...
  
  {$R *.res}
  
  type
    TScreenSaverMode = (ssmConfig, ssmDisplay, ssmPreview, ssmPassword);
  
  function GetScreenSaverMode: TScreenSaverMode;
  begin
    // Some non-interesting code
  end;
  
  var
    i: integer;
    presentationForms: array of TpresentationFrm;
  
  begin
    Application.Initialize;
    Application.MainFormOnTaskbar := True;
  
    case GetScreenSaverMode of
      ssmConfig:
        Application.CreateForm(TconfigFrm, configFrm);
      ssmDisplay:
        begin
          SetLength(presentationForms, Screen.MonitorCount);
          for i := 0 to high(presentationForms) do
          begin
            Application.CreateForm(TpresentationFrm, presentationForms[i]);
            presentationForms[i].BoundsRect := Screen.Monitors[i].BoundsRect;
            presentationForms[i].Visible := true;
          end;
        end
    else
      ShowMessage(GetEnumName(TypeInfo(TScreenSaverMode), integer(GetScreenSaverMode)));
    end;
  
    Application.Run;
  end.
  </code></pre>
  
  <p>When the <code>ssmDisplay</code> code is executed, two forms are indeed created (yes, I have exactly two monitors). But they both appear on the first monitor (index 0, but not the primary one).</p>
  
  <p>When stepping through the code, I see that the <code>Screen.Monitors[i].BoundsRect</code> are correct, but for some reason the forms obtain incorrect bounds:</p>
  
  <pre><code>Watch Name                          Value (TRect: Left, Top, Right, Bottom, ...)
  Screen.Monitors[0].BoundsRect   (-1680, 0, 0, 1050, (-1680, 0), (0, 1050))
  Screen.Monitors[1].BoundsRect   (0, 0, 1920, 1080, (0, 0), (1920, 1080))
  
  presentationForms[0].BoundsRect (-1680, 0, 0, 1050, (-1680, 0), (0, 1050))
  presentationForms[1].BoundsRect (-1920, -30, 0, 1050, (-1920, -30), (0, 1050))
  </code></pre>
  
  <p>The first form get the desired position, but the second does not. Instead of going from x=0 to 1920, it occupies x=-1920 to 0, i.e. it appears on the first monitor, above the first form. What is wrong? What is the proper procedure to accomplish what I want?</p>