积极答复者
显示子窗体怎么相对于父窗体居中?

问题
答案
-
-
Hi Trian555,
你可以设置子窗体的WindowStartupLocation属性值为CenterOwner
ownerformschildren ownedWindow = new ownerformschildren(); ownedWindow.Owner = this; ownedWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner; ownedWindow.Show();
替换ownerformschildren为你的子窗体。
Best Regards,
Yong LuMSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.- 已标记为答案 Trian555 2019年2月28日 9:17
全部回复
-
-
Hi Trian555,
你可以设置子窗体的WindowStartupLocation属性值为CenterOwner
ownerformschildren ownedWindow = new ownerformschildren(); ownedWindow.Owner = this; ownedWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner; ownedWindow.Show();
替换ownerformschildren为你的子窗体。
Best Regards,
Yong LuMSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.- 已标记为答案 Trian555 2019年2月28日 9:17