监控键盘鼠标
来源:互联网 发布:施工定额软件 编辑:程序博客网 时间:2024/05/03 23:16
[DllImport("USER32.DLL",CallingConvention=CallingConvention.StdCall)]
private static extern int GetCursorPos (ref Point lpPoint);
[DllImport("USER32.DLL",CallingConvention=CallingConvention.StdCall)]
private static extern int GetKeyboardState(ref byte lpKeyState);
private Point ptOld=new Point(0,0);
private void Form1_Load(object sender, System.EventArgs e)
{
GetCursorPos(ref ptOld); //启动时鼠标所处的位置
}
private void timer1_Tick(object sender, System.EventArgs e)
{
byte[] bytCurKeyState=new byte[256];
GetKeyboardState(ref bytCurKeyState[0]);
for (int i=0;i<256;i++)
{
if (bytCurKeyState[i] > 1 ) //检查当前是否有个键盘被按下(包括鼠标)
{
Close();
}
}
Point pt=new Point(0,0);
GetCursorPos(ref pt);
if (!pt.Equals(ptOld)) //检查鼠标是否移动了
{
Close();
}
}
private static extern int GetCursorPos (ref Point lpPoint);
[DllImport("USER32.DLL",CallingConvention=CallingConvention.StdCall)]
private static extern int GetKeyboardState(ref byte lpKeyState);
private Point ptOld=new Point(0,0);
private void Form1_Load(object sender, System.EventArgs e)
{
GetCursorPos(ref ptOld); //启动时鼠标所处的位置
}
private void timer1_Tick(object sender, System.EventArgs e)
{
byte[] bytCurKeyState=new byte[256];
GetKeyboardState(ref bytCurKeyState[0]);
for (int i=0;i<256;i++)
{
if (bytCurKeyState[i] > 1 ) //检查当前是否有个键盘被按下(包括鼠标)
{
Close();
}
}
Point pt=new Point(0,0);
GetCursorPos(ref pt);
if (!pt.Equals(ptOld)) //检查鼠标是否移动了
{
Close();
}
}
- 监控键盘鼠标
- WinForm监控键盘鼠标
- python监控键盘鼠标
- [Delphi]Delphi监控键盘鼠标的程序
- QT中监控全局键盘鼠标事件
- QT中监控全局键盘鼠标事件
- Liunx python pyxhook 监控键盘/鼠标
- 在VB中如何用API监控鼠标和键盘
- C#.Net 鼠标和键盘全局监控勾子(hook )
- C#钩子实现简单鼠标键盘的监控和屏蔽
- [Winform]通过钩子监控键盘操作和鼠标移动
- C#监控全局监控鼠标键盘。请谨慎使用,不做违法开发
- 鼠标键盘
- 键盘监控
- iOS键盘监控键盘
- 鼠标、键盘模拟技术
- 锁定键盘和鼠标
- 模拟鼠标/键盘
- 网页病毒原来是这样产生的
- 全球微软认证人数统计列表
- 走进微软系统工程师MCSE认证
- 【译文】《XQuery 1.0: An XML Query Language 2004-7-23 草案 第四章》
- MCSE2000 的考试课程介绍
- 监控键盘鼠标
- 检测字符串中是否有中文
- SQL语法全接触
- 有关 MCSE 认证的常见问题解答
- 工作、心情
- 超级连接在值的传递过程中发生丢失
- 考试与测试过程中的常见问题解答
- 有关考试安全和完整性的常见问题解答
- TPC基准程序及tpmc值-兼谈在使用性能度量时如何避免误区[转载]