• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 580
  • Last Modified:

keybd_event not working in Vista?

I have an application that accepts the below command just fine in XP but after I try the same application Vista it no longer works.

Any new suggestings?

keybd_event(Keys.X, MapVirtualKey(Keys.X, 0), 0, 0)
keybd_event(Keys.X, MapVirtualKey(Keys.X, 0), 2, 0)

Open in new window

  • 2
1 Solution
Windows NT/2000/XP/Vista:This function has been superseded. Use SendInput instead.

vaultworldAuthor Commented:
It was that I need to run the program as administrator.

Here's a link with more information:  http://www.xtremevbtalk.com/showthread.php?t=302788
Can you post the solution so I know it also for future use :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now