miércoles, 26 de agosto de 2009

C# Centrar un formulario en pantalla.

En el evento Load del form que queráis centrar en pantalla:


this.Top = (Screen.PrimaryScreen.WorkingArea.Height - this.Height) / 2;
this.Left = (Screen.PrimaryScreen.WorkingArea.Width - this.Width) / 2;

2 comentarios: