在 vb.net 中引用屏幕高度和宽度 [英] Referencing screen height and width in vb.net

查看:36
本文介绍了在 vb.net 中引用屏幕高度和宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 vb.net 中引用屏幕高度和宽度?例如,右下角的位置、右上角的位置等.

How do I reference the screen height and width in vb.net? For example, the bottom right corner's locations, the top right corner's locations, etc.

我尝试了 My.Computer.Screen 但找不到任何告诉我大小的信息.

I tried My.Computer.Screen but couldnt find anything that told me the size.

推荐答案

您可以使用:

My.Computer.Screen.Bounds

或:

Screen.PrimaryScreen.Bounds

边界是一个矩形这提供了大小.或者,您可以查看 WorkingArea,不包括任务栏和停靠窗口.

Bounds is a rectangle that provides the size. Alternatively, you can look at the WorkingArea, which will not include the task bar and docked windows.

这篇关于在 vb.net 中引用屏幕高度和宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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