如何将鼠标和键盘事件发送到另一个进程? [英] How do I send mouse and keyboard events to another process?
本文介绍了如何将鼠标和键盘事件发送到另一个进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
进程A是发件人,进程B是接收方。
进程B正在运行一个经典的Win32 API事件循环
如何从进程A生成并发送鼠标和键盘事件到B? p>
解决方案
基本上通过 SendMessage
或 PostMessage
。如果要模拟整个操作系统的输入事件,则 SendInput
可能很有趣。
Let's assume that we've got 2 windows processes ,
Process A is the sender, and Process B is the receiver.
Process B is running a classic Win32 API events loop
How do I generate and send mouse and keyboard events from process A to B ?
解决方案
Basically via SendMessage
or PostMessage
. If you want to simulate input events for the whole operating system, then SendInput
might be interesting.
这篇关于如何将鼠标和键盘事件发送到另一个进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文