如何获得屏幕的总像素大小 [英] How to get total pixel size of the screen

查看:48
本文介绍了如何获得屏幕的总像素大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在编写一个生成图形的应用程序.我需要根据屏幕尺寸(以像素为单位)设置条形尺寸
如何使用vb.net代码获取以像素为单位的总屏幕尺寸?

感谢

Hi,
I am writing an application that generates graphs. I need to set the bar size according to the size of screen (in pixels)
How can I get the total screen size in pixels using vb.net code?

Thanks

推荐答案

对于WPF,请参阅此答案中的解决方案:
http://stackoverflow.com/questions/1927540/how-to-to-get-the-the-size-of-the-current-screen-in-wpf [ http://msdn.microsoft.com/en-us/library/system. windows.forms.screen.aspx [ ^ ].

请看我对这个问题的评论.始终指定您的应用程序类型和UI库.标记它,例如"WPF",表单".

—SA
For WPF, please see the solution in this answer:
http://stackoverflow.com/questions/1927540/how-to-get-the-size-of-the-current-screen-in-wpf[^].

For System.Windows.Forms, use the class Screen:
http://msdn.microsoft.com/en-us/library/system.windows.forms.screen.aspx[^].

Please see my comment to the question. Always specify your application type and UI library. Tag it, such as "WPF", "Forms".

—SA


这篇关于如何获得屏幕的总像素大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆