Search code examples
c#windows-vista32-bitsendkeysincompatibility

C# Sendkeys in Vista


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 leave alot of other options.

Thanks in advance!


Solution

  • 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.