捕获和C#发送键盘/鼠标输入

编程入门 行业动态 更新时间:2024-10-22 16:36:27
本文介绍了捕获和C#发送键盘/鼠标输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我要寻找一种方式来发送和无论什么样的应用程序具有焦点接收键盘信息。我记得在大学看到关于一个老的Windows API一个presentation,让你改变光标的位置,并发送正确的点击和这样的。

I am looking for a way to send and receive keyboard information regardless of what app has focus. I remember back in College seeing a presentation about an old Windows API that let you change the cursor position and send right clicks and such.

此外User32.dll中有没有办法使用.NET Framework做到这一点?

Besides User32.dll is there a way to do this with the framework?

推荐答案

据我所知,有没有办法捕捉到全球的键盘和放大器;鼠标事件。但也有它演示了同一个.NET类包装的创建上$ C $的CProject的几篇文章。

AFAIK, there's no way to capture the GLOBAL keyboard & mouse events. But there are a few articles on CodeProject which demonstrate the creation of .NET class wrappers for the same.

您可以在这里检查出来:

You can check them out here:

1)在C#中 处理全球鼠标和键盘钩子

1) Processing Global Mouse and Keyboard Hooks in C#

2)全球鼠标和键盘图书馆

编辑:顺便说一句,我创造了用1号库在C#中的小键盘记录器:)

BTW, I had created a SMALL keylogger in C# using the 1st library :)

更多推荐

捕获和C#发送键盘/鼠标输入

本文发布于:2023-11-07 05:28:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1565665.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:鼠标   键盘

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!