[英]How to get total pixel size of the screen
我正在编写一个生成图形的应用程序。 我需要根据屏幕尺寸(以像素为单位)设置条形尺寸。如何使用vb.net代码获取以像素为单位的总屏幕尺寸?
Screen.PrimaryScreen.Bounds.Width
Screen.PrimaryScreen.Bounds.Height
您可以使用:
Screen.PrimaryScreen.Bounds.Width
Screen.PriamryScreen.Bounds.Height
要么:
My.Computer.Screen.Bounds.Width
My.Computer.Screen.Bounds.Height
或者,您可以查看Screen.WorkingArea
,它为您提供工作区域的尺寸(不包括停靠的窗口,工具栏等)。
也许是这样的:
Dim intX As Integer = Screen.PrimaryScreen.Bounds.Width
Dim intY As Integer = Screen.PrimaryScreen.Bounds.Height
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.