Center form on screen or on parent

后端 未结 4 1337
生来不讨喜
生来不讨喜 2020-12-28 10:07

Since built in functionality for positioning forms in VB.NET are not always suitable to use I try to make my sub to do that.

But I missed something...



        
4条回答
  •  滥情空心
    2020-12-28 10:22

    This might also be of use:

        myForm.StartPosition = FormStartPosition.CenterParent
        myForm.ShowDialog()
    

    You can also use FormStartPosition.CenterScreen

提交回复
热议问题