estoy tratando de establecer un formulario Windows en el monitor secundario, de la siguiente manera:¿Mostrando un formulario de Windows en un monitor secundario?
private void button1_Click(object sender, EventArgs e)
{
MatrixView n = new MatrixView();
Screen[] screens = Screen.AllScreens;
setFormLocation(n, screens[1]);
n.Show();
}
private void setFormLocation(Form form, Screen screen)
{
// first method
Rectangle bounds = screen.Bounds;
form.SetBounds(bounds.X, bounds.Y, bounds.Width, bounds.Height);
// second method
//Point location = screen.Bounds.Location;
//Size size = screen.Bounds.Size;
//form.Left = location.X;
//form.Top = location.Y;
//form.Width = size.Width;
//form.Height = size.Height;
}
Las propiedades de los límites parecen correctas, pero en los dos métodos que he probado, esto maximiza la forma en el monitor principal. ¿Algunas ideas?
Para estar seguro, el WindowState en MatrixView no está * Maximizado *, ¿verdad? –
@Austin No, WindowState es Normal. –