How to use SendKeys

  • 14 years ago
    How can I press ScrollLock by sendKeys, I want to actually light up the scroll lock light in my computer, when I use SendKeys.Send("{SCROLLLOCK"); it didn't work, do you know how can I do that?
    Thanks


  • 14 years ago

    cubbuk wrote:
    How can I press ScrollLock by sendKeys, I want to actually light up the scroll lock light in my computer, when I use SendKeys.Send("{SCROLLLOCK"); it didn't work, do you know how can I do that?
    Thanks


     

    It could be a typo.  You're missing the last curly bracket around "Scrolllock".  You should have:

     

          SendKeys.Send("{SCROLLLOCK}");

    Also, while this function will mimic the pressing of the scrolllock key for text input, it may not (and probably won't) mimic the effect pressing of the key has on the keyboard.

  • 14 years ago
  • 14 years ago

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Linux is only free if your time has no value” - Jamie Zawinski