How to CenterParent a non-modal form

前端 未结 4 1360
旧时难觅i
旧时难觅i 2020-12-11 00:07

I have a non-modal child form which opens up from a parent form. I need to center the child form to its parent form. I have set property of child form to CenterParent<

4条回答
  •  眼角桃花
    2020-12-11 00:43

    Form2 f = new Form2();
    f.StartPosition = FormStartPosition.CenterParent;
    f.Show(this);
    

提交回复
热议问题