在 C# 中以 Windows 形式获取屏幕大小(以像素为单位) [英] Get screen size in pixels in windows form in C#

查看:27
本文介绍了在 C# 中以 Windows 形式获取屏幕大小(以像素为单位)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能的重复:
如何从 C# winform 中检索屏幕分辨率应用程序?

如何在 Windows 窗体中获取屏幕大小?

How can I get the screen size in Windows forms?

推荐答案

检查 Screen 类及其属性 Bounds

Check the Screen class and its property Bounds

Screen.PrimaryScreen.Bounds.Width;
Screen.PrimaryScreen.Bounds.Height;
Screen.PrimaryScreen.Bounds.Size;

这篇关于在 C# 中以 Windows 形式获取屏幕大小(以像素为单位)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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