博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
获取屏幕分辨率
阅读量:4483 次
发布时间:2019-06-08

本文共 912 字,大约阅读时间需要 3 分钟。

Winform取屏幕大小

2011/3/4 16:36:58 - tanlixiao
Winform(C#)获取屏幕大小,包括全屏大小,除任务栏大小和全屏大小
L M S
当前的屏幕除任务栏外的工作域大小
this.Width = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width;
this.Height = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height;

当前的屏幕包括任务栏的工作域大小

this.Width=System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
this.Height=System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;

任务栏大小

this.Width=System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width-System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width;
this.Height=System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height-System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height;

winform实现全屏显示

WinForm:
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.TopMost = true;

转载于:https://www.cnblogs.com/bingle/archive/2013/05/11/3072829.html

你可能感兴趣的文章
终于有人把Elasticsearch原理讲透了
查看>>
Java使用POI 读取和写入Excel指南
查看>>
shell脚本中各类括号的作用(小结)
查看>>
借用Snippet插件美化博客中的代码
查看>>
深入研究java.lang.Runtime类
查看>>
10677 我们仍未知道那天所看见的花的名字
查看>>
ScanTailor-ScanTailor 自动矫正图像歪斜
查看>>
UVA GCD - Extreme (II)
查看>>
完成个人中心—导航标签
查看>>
【C++】C++中变量的声明与定义的区别
查看>>
前端性能优化
查看>>
static
查看>>
属性动画
查看>>
Swift 字符串
查看>>
Python 生成器 Generator 和迭代器 Iterator
查看>>
实现icon和文字垂直居中的两种方法-(vertical-align and line-height)
查看>>
[CareerCup] 3.6 Sort Stack 栈排序
查看>>
Beta版总结会议
查看>>
Cocos2d-x中使用的数据容器类
查看>>
创建ORACLE 查询用户
查看>>