Click to See Complete Forum and Search --> : HotKeys!
m i k e l
Nov 25th, 1999, 09:14 PM
How do I setup a simple HotKey for the F12 button, without a module\active x.
All I wish for the keypress to do, is once you press F12, it will show a frame, and hide a listview. thank you for who answers
Inhumanoid
Nov 25th, 1999, 09:23 PM
If there is a form that has focus when you press F12 set it's keypreview to true and then handle your events in the keydown or keyup events (keycode = vbKeyF12)
if there's no form that has the focus you use:
Public Declare Function RegisterHotKey Lib "user32" (ByVal hWnd As Long, ByVal id As Long, ByVal fsModifiers As Long, ByVal vk As Long) As Long
Public Declare Function UnregisterHotKey Lib "user32" (ByVal hWnd As Long, ByVal id As Long) As Long
[This message has been edited by Inhumanoid (edited 11-26-1999).]
m i k e l
Nov 25th, 1999, 09:30 PM
Thank you,
I now see why it was not working before; I forgot to set the keypreview on true, thank you again
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.