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();
}
}
}
查看全文
相关阅读:
weblogic详解
Java中常见的5种WEB服务器介绍
Eclipse 插件ibeetl
Eclipse安装svn插件的几种方式
在 Laravel 应用中使用 pjax 进行页面加速
Pjax无刷新跳转页面实现,支持超链接与表单提交
emlog通过pjax实现无刷新加载网页--完美解决cnzz统计和javascript失效问题
PJAX全局无刷新的设置方法~
pjax使用小结
jQuery+pjax简单示例汇总
原文地址:https://www.cnblogs.com/wy/p/209712.html
最新文章
《how to design programs》第11章自然数
《how to design programs》第10章表的进一步处理
数据挖掘模拟退火算法(《集体智慧编程》第5章优化)
《编程珠玑》第二章 aha算法
转:SCHEME 语言是怎么来的 -1
c++ ifstream ofstream 文件流
双层桶划分
文艺编程 Literate Programming
并发(Concurrency)和并行(Parallelism)的区别
《how to design programs》9.3处理任意长度的表
热门文章
iOS 多线程编程之Grand Central Dispatch(GCD)
Jetty总览
ubuntu无法解析主机错误与解决的方法
HTML
PAT 1002 Hello World for U (20)
Android Branch and master source code merge(patch)
UML建模技术(资料汇总)
公布一款小游戏《小鱼儿连连看2》
软件測试的类型、方法以及策略------一张图搞定
C++智能指针的实现
Copyright © 2011-2022 走看看