询问者
winform应用,运行在win10系统125%缩放的界面上,当创建System.Windows.Media.MediaPlayer时,窗体会重绘变小

问题
全部回复
-
你好,
根据我的测试,我发现并没有重现你的问题,在我创建了System.Windows.Media.MediaPlayer后,即使我把系统缩放到125%的界面上,窗体只会自适应变大,这是正常的。
你可以提供下相关截图吗,以便于我们能够分析你的问题。
Best Regards,
Jack
MSDN 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.- 已建议为答案 Mens Silver Jewelry 2021年8月2日 7:36
-
你好,感谢回答
关于该情况,已经使用提问中提到的解决办法处理了。
具体问题效果是应该最大化的窗体只显示在屏幕的左上角。
示例代码:
public partial class Form1 : Form { public Form1() { InitializeComponent(); WindowState = FormWindowState.Maximized; Task.Factory.StartNew(() => { new System.Windows.Media.MediaPlayer(); }); } public override Size MaximumSize { get { return new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height); } set { base.MaximumSize = value; } } }
- 已编辑 傻子Lynn 2021年7月28日 9:58
- 已建议为答案 cheap fine jewelry 2021年8月5日 3:13