我将表单设置为全屏显示,并尝试将width
和height
用作整数。我一直在找过去的一个小时,但似乎找不到答案。在Java中,这JFrame.getwidth();
对于c#来说很简单,但是却不那么简单?
使用Windows表单
该屏幕可以帮助你获得大小。
Screen.PrimaryScreen.Bounds.Width;
Screen.PrimaryScreen.Bounds.Height;
Screen.PrimaryScreen.Bounds.Size;
您还可以查看如何从C#winform应用程序检索屏幕分辨率?
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句