|
-
Oct 30th, 2001, 01:38 PM
#1
Thread Starter
Lively Member
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
-
Oct 30th, 2001, 02:22 PM
#2
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.
-
Oct 30th, 2001, 02:22 PM
#3
Lively Member
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.
-
Oct 30th, 2001, 02:33 PM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|