zoukankan
html css js c++ java
取得屏幕刷新率
using
System;
using
System.Runtime.InteropServices;
namespace
ConsoleApplication
{
public
sealed
class
EntryPoint
{
private
EntryPoint()
{}
[DllImport(
"
Gdi32.dll
"
, CharSet
=
CharSet.Auto, ExactSpelling
=
true
)]
public
static
extern
int
GetDeviceCaps(IntPtr hDC,
int
nIndex);
/**/
///
<summary>
///
获得屏幕刷新率
///
</summary>
public
static
int
RefreshRate
{
get
{
IntPtr desktopDC
=
GetDC(GetDesktopWindow());
return
GetDeviceCaps(desktopDC,
116
);
}
}
[DllImport(
"
User32.dll
"
)]
public
extern
static
IntPtr GetDesktopWindow();
[DllImport(
"
User32.dll
"
)]
public
static
extern
IntPtr GetDC(IntPtr hWnd);
static
void
Main()
{
Console.WriteLine(
"
屏幕刷新率为: {0}Hz
"
,RefreshRate);
Console.ReadLine();
}
}
}
查看全文
相关阅读:
ftp服务器架设
samba服务器架设
apache安装
yum及prm安装
redis安装与使用
memcached安装与使用
mysql主从服务器
nginx负载均衡服务器搭建
lnmp环境搭建
linux笔记
原文地址:https://www.cnblogs.com/wy/p/209712.html
最新文章
阿里云视频直播录制--手动录制
蓝桥决赛给的资源包的DS18B20的读取温度的写法
蓝桥嵌入式——e2prom的读写函数。
单总线协议的DS18B20
测量ne555方波发生器的方法——使用定时器
状态机检测矩阵键盘以及消抖的方法
PCF8591——AD/DA 的使用
蓝桥继续水——E2PROM的驱动读写(AT24C02的使用)
蓝桥省赛后继续水——超声波驱动程序
蓝桥杯准备day3之数码管的静态与动态显示,练习
热门文章
位数频率
递归函数
按位运算符
修改寄存器的位操作方法
Linux常用命令
五位数的数字总和
密码破译
嵌入式volatile用法
gedit操作
判断奇偶数
Copyright © 2011-2022 走看看