Results 1 to 3 of 3

Thread: HotKeys!

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 1999
    Posts
    22

    Post

    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

  2. #2
    Hyperactive Member
    Join Date
    Oct 1999
    Posts
    309

    Post

    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:

    Code:
    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).]

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 1999
    Posts
    22

    Post

    Thank you,

    I now see why it was not working before; I forgot to set the keypreview on true, thank you again

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