public static void ToCenter(this Form f) { f.Location = new Point( (Screen.PrimaryScreen.WorkingArea.Width - f.Width) / 2, (Screen.PrimaryScreen.WorkingArea.Height - f.Height) / 2 ); }