将点击消息发送到另一个应用程序

问题描述:

伙计们

我有一个场景,我需要将点击事件发送到独立的应用程序.我使用以下代码启动了该应用程序.

Hi Guys

I have a scenario, i need to send click events to an independent application. I started that application with the following code.

private Process app;
app = new Process();
app.StartInfo.FileName = app_path;
app.StartInfo.WorkingDirectory = dir_path;
app.Start();



现在,我想向该应用程序发送鼠标单击"消息,相对于应用程序窗口,我有特定的坐标.如何使用Windows Messaging或任何其他技术来做到这一点.

希望获得帮助,并在此先感谢您的帮助.



Now i want to send Mouse click message to that applicaiton, I have specific coordinates in relative to application window. How can i do it using Windows Messaging or any other technique.

Hope to get help, and thanks in advance for help.

请尝试以下操作, ^ ]
Try this, How to: Simulate Mouse and Keyboard Events in Code[^]