CSKernelClient.cWindow.centerForm C# (CSharp) Méthode

centerForm() public static méthode

public static centerForm ( Form form ) : void
form System.Windows.Forms.Form
Résultat void
        public static void centerForm(Form form) 
        {
            form.Left = (Screen.FromControl(form).Bounds.Width - form.Width) / 2;
            form.Top = (Screen.FromControl(form).Bounds.Height - form.Height) / 2;
        }