积极答复者
C# MDI子窗口最小化时图标会显示在左下角, 有办法移动它的位置吗?

问题
-
点击MDI子窗口的最小化时, 窗口会显示在左下角, 由于我的主窗口的下半部分放有panel, 现在panel把最小化窗口的图标给档住了, 有办法重新定位一下最小化状态下的窗口吗?
注:窗口在Normal状态下(child_2.WindowState == FormWindowState.Normal) 是可以用以下两句重新定位窗口位置的
child_2.StartPosition = FormStartPosition.Manual; //重新设置显示位置
child_2.Location = new Point(300,200);但为啥在Minimized最小化状态下,即child_2.WindowState == FormWindowState.Minimized , 上面这两句不起作用了.
答案
-
你好,
试试这段代码:
改用P/Invoke来SetPosition.
Best regards,
Barry
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 晨奈 2015年4月13日 9:18
全部回复
-
你好,
试试这段代码:
改用P/Invoke来SetPosition.
Best regards,
Barry
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 晨奈 2015年4月13日 9:18