FormStartPosition.CenterParent does not work

前端 未结 13 975
独厮守ぢ
独厮守ぢ 2021-01-01 08:57

In the following code, only the second method works for me (.NET 4.0). FormStartPosition.CenterParent does not center the child form over its parent. Why?

13条回答
  •  失恋的感觉
    2021-01-01 09:37

    Using

    form.Show(this);
    

    throws an exception if you call it a second time. Manually setting the location seems to be the only reliable option :/ (wasn't it fairly recently that CenterParent used to work?)

提交回复
热议问题