keybd_event not working in Vista?

Posted on 2009-02-23
Last Modified: 2012-05-06
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

Question by:vaultworld
    LVL 53

    Expert Comment

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

    Accepted Solution

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

    Here's a link with more information:
    LVL 53

    Expert Comment

    Can you post the solution so I know it also for future use :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    This video discusses moving either the default database or any database to a new volume.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now