Results 1 to 8 of 8

Thread: How to simulate a key being pressed?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2006
    Posts
    88

    How to simulate a key being pressed?

    Let's say I wanted to simulate pressing the right arrow key. What would be the code for this? Or, the code in general?

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: How to simulate a key being pressed?

    In your own app, or in a different app?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2006
    Posts
    88

    Re: How to simulate a key being pressed?

    In my own.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Oct 2006
    Posts
    88

    Re: How to simulate a key being pressed?

    Is it just

    Sendkeys "vbkeyRight"

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Oct 2006
    Posts
    88

    Re: How to simulate a key being pressed?

    Or something like that..

  6. #6
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: How to simulate a key being pressed?

    Pretty much (actually its {RIGHT}), but here is the whole sendkeys reference:
    http://msdn2.microsoft.com/en-us/lib....sendkeys.aspx

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Oct 2006
    Posts
    88

    Re: How to simulate a key being pressed?

    SendKeys {RIGHT} doesn't work.

  8. #8
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: How to simulate a key being pressed?

    Read the link, but its SendKeys.Send("{RIGHT}")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width