开发者

C# Sendkeys in Vista

开发者 https://www.devze.com 2023-01-19 06:10 出处:网络
I was working on a macro program in C#, which used SendKeys.Send(Wait) and worked fine in Windows XP.

I was working on a macro program in C#, which used SendKeys.Send(Wait) and worked fine in Windows XP.

Most people know that using sendkeys in Vista (32-bit) or above causes problems, but mine seems a little strange:

When using: SendKeys.Send("B"); - It doesn't do anything.

When using SendKeys.SendWait("B"); - It sends about 10 B's before it stops.

Does anyone know what to do now, because this doesn't le开发者_开发知识库ave alot of other options.

Thanks in advance!


Which version of .Net are you using? See the note about using SendKeys in Vista at SendKeys Class

You can also try using Windows Input Simulator as an alternative. It has much more powerful api too.

0

精彩评论

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