开发者

SendKeys.SendWait doesn't works

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜