Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 571
  • 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

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

http://msdn.microsoft.com/en-us/library/ms646310(VS.85).aspx
0
 
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
0
 
DhaestCommented:
Can you post the solution so I know it also for future use :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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