Windows 窗体无法在 CenterScreen 中显示

Windows Form Cannot be Displayed CenterScreen

我使用此代码作为辅助形式来执行/类似于 mdi,这是 windows 形式 C#

        frmFontLoad fontLoad = new frmFontLoad();
        
        fontLoad.TopLevel = false;
        Controls.Add(fontLoad);
        fontLoad.Show();
        fontLoad.BringToFront();

但是加载表单的结果是这样的,参考截图:

Form

表单加载代码:

  private void frmLabelPNInput_Load(object sender, EventArgs e)
        {
            this.StartPosition = FormStartPosition.CenterScreen;

            Printer_SerialPort = new SerialPort(ConfigurationManager.AppSettings["Printer_com_port"]);

            btnOk.Enabled = false;
        }

如何让这个辅助表单显示在中心?

        frmProgress progress = new frmProgress();
        progress.Left = (this.ClientSize.Width - progress.Width) / 2;
        progress.Top = (this.ClientSize.Height - progress.Height) / 2;

这解决了我的问题,谢谢