开发者

SendKeys.SendWait doesn't works

开发者 https://www.devze.com 2022-12-30 05:09 出处:网络
My target is to send keyboard events to external application. From my application, I\'m launching a C# exe (console application) that bring the target application to the front and uses SendKeys.SendWa

My target is to send keyboard events to external application. From my application, I'm launching a C# exe (console application) that bring the target application to the front and uses SendKeys.SendWait to send keyboards events. I ran into a rate case were the command don't have any affect. When debugging it, it works but when running it not in debug it fails. I 开发者_JAVA百科think it as something to do with the fact that when debugging my application is the active application.


You'll need to do a little work, and it changes depending on the version of Windows. There's an MSDN page that has a good explanation and an example:

http://msdn.microsoft.com/en-us/library/ms171548.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消