Results 1 to 4 of 4

Thread: Anything like "On Key Label" in VB?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2000
    Posts
    82

    Anything like "On Key Label" in VB?

    When I used to program in FoxPro, there was a function named "On Key Label", which, when defined, would make a keystroke combination execute a particular piece of code throughout the app. You would declare it in "sub main" and it would work everywhere. For example:
    "ON KEY LABEL F12 DO some_code"

    Does VB have anything like this?

    Thanks,
    Jeff

  2. #2
    Tygur
    Guest
    You can use the KeyDown, KeyPress, and KeyUp events of the form to detect keystrokes within your app. Just set the KeyPreview property of the form to True.

  3. #3
    Lively Member rc1980's Avatar
    Join Date
    Sep 2001
    Posts
    106
    you could always make a menu and set it's visible property to false and set hot keys to it's sub items in the menu editor.

    or you could register hot keys with api's.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    In short, Jeff, the answer is No. There is no straightforward way of doing that in VB, but will a little creative coding, you can simulate it.

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