C# 版键盘鼠标 钩子

时间:2015-02-05 03:29:08
【文件属性】:

文件名称:C# 版键盘鼠标 钩子

文件大小:48KB

文件格式:ZIP

更新时间:2015-02-05 03:29:08

键盘 鼠标 控制 钩子

类已经实现 使用简单 private void Form1_Load(object sender, EventArgs e) { mkhook.OnKeyDownEvent += new KeyEventHandler(OnKeyDownEventHandler); mkhook.OnMouseActivity += new MouseEventHandler(OnMouseEventHandler); } private void OnKeyDownEventHandler(object sender, KeyEventArgs e) { this.lblkey.Text += e.KeyCode + "__" + e.KeyValue; // e.KeyCode Console.WriteLine("KeyDown......"); } private void OnMouseEventHandler(object sender, MouseEventArgs e) { this.lblMouse.Text = "X:" + e.X + "___Y:" + e.Y; Console.WriteLine("MouseEvent......"); }


【文件预览】:
WindowsApplication3
----Form1.Designer.cs(4KB)
----Program.cs(478B)
----obj()
--------WindowsApplication3.csproj.FileListAbsolute.txt(952B)
--------Debug()
----bin()
--------Debug()
----Form1.cs(1KB)
----KeyBordHook.cs(15KB)
----Form1.resx(6KB)
----WindowsApplication3.csproj(3KB)
----Properties()
--------AssemblyInfo.cs(1KB)
--------Settings.Designer.cs(1KB)
--------Resources.resx(5KB)
--------Settings.settings(249B)
--------Resources.Designer.cs(3KB)
WindowsApplication3.suo
WindowsApplication3.sln

网友评论