How can I display a form on a secondary monitor?
The form has to be visible in order to set the bounds using BoundRect.
Reverse the lines like this:
presentationForms[i].Visible := true;
presentationForms[i].BoundsRect := Screen.Monitors[i].BoundsRect;
Apparently I try to set the position prematurely.
Replace the for
loop block with
Application.CreateForm(TpresentationFrm, presentationForms[i]);
presentationForms[i].Tag := i;
presentationForms[i].Visible := true;
and then write
procedure TpresentationFrm.FormShow(Sender: TObject);
begin
BoundsRect := Screen.Monitors[Tag].BoundsRect;
end;