Jump to content

Preciso abrir um formulário em outro Monitor


Recommended Posts

Criei essa procedure, ela esta funcionando em partes, quando vou atribuir o Left a ela do meu segundo monitor o

Valor Monitor.Left vem (1366) mas o Formulario.Left recebe somente 150, não sei oq pode ser

procedure TForm1.SelecionaMonitor(Index: Integer; Formulario: TForm);
var
  MonitorIndex: Integer;
  Monitor: TMonitor;
begin
  MonitorIndex := Index;
  if (MonitorIndex >= 0) and (MonitorIndex < Screen.MonitorCount) then
  begin
    Monitor := Screen.Monitors[MonitorIndex];
    with Formulario do
    begin
      Width   := Monitor.Width;
      Height  := Monitor.Height;
      Left    := Monitor.Left;
      Top     := Monitor.Top;
    end;
  end;
end;

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Who's Online   0 Members, 0 Anonymous, 3 Guests (See full list)

    • There are no registered users currently online


×
×
  • Create New...