Samuel Toh

Samuel Toh

  • NA
  • 106
  • 16.7k

Positioning textboxes and labels in Windows Form C#

Oct 27 2021 4:02 PM

private void Registeration_Load(object sender, EventArgs e)
        {

                for (int i = 0; i < Application.OpenForms.Count; i++)
            {
                Application.OpenForms[i].WindowState = FormWindowState.Maximized;
            }
        }

I have automatically maximized the windows form after the page loads. However, the textboxes and labels are not in the center of the windows form after it is maximized and I was wondering if there is any solution to have both the textboxes and labels to be at the center of the page after I load it?


Answers (1)