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();
}
}
}
查看全文
相关阅读:
spring FactoryBean配置Bean
注意使用 BTREE 复合索引各字段的 ASC/DESC 以优化 order by 查询效率
Mysql经常使用基本命令汇总及默认账户权限与改动
图像边缘检測--OpenCV之cvCanny函数
HDU 1556 Color the ball 树状数组 题解
JMeter使用记录2 -- Web測试
C++编程
矩阵树定理速证
DM816x算法具体解释--之OSD
哥尼斯堡的“七桥问题”(25分)(欧拉回路,并查集)
原文地址:https://www.cnblogs.com/wy/p/209712.html
最新文章
DNS劫持(网页打不开的解决方法)
js省市联动
library not found for -lPods-AFNetworking解决放案
Windows Azure 系列-- Azure Redis Cache的配置和使用
[Android]生成heap dump文件(.hprof)
网络状态监測之 Reachability的使用
《排序算法》——堆排序(大顶堆,小顶堆,Java)
个性字体生成并引用方式
sql server2008对字符串日期字段分区
javaScript中的事件对象event
热门文章
分段线性变换函数——比特平面分层
Request的getParameter和getAttribute方法的差别
ORA-28040: No matching authentication protocol
LeetCode -- 求字符串数组中的最长公共前缀
杭电3501Calculation 2 欧拉函数
.Net MVC的学习(一)
AutoCompleteTextView和Spinner的使用方法
hashmap 循环取出全部值 取出特定的值 两种方法
oracle-data-mining
linux基础知识的总结
Copyright © 2011-2022 走看看