Results 1 to 5 of 5

Thread: Menubar popup when F10 is pressed

  1. #1

    Thread Starter
    Frenzied Member HanneSThEGreaT's Avatar
    Join Date
    Nov 2003
    Location
    Vereeniging, South Africa
    Posts
    1,492

    Menubar popup when F10 is pressed

    Hello!

    I know this is a dumb question.

    Say for instance I have a menu on my form. When F10 is pressed, it activates the menu. It does that with every window in every application.

    How can I prevent the menu becoming Active when F10 is pressed ¿
    VB.NET MVP 2008 - Present

  2. #2
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: Menubar popup when F10 is pressed

    Does this happen in Windows in general????

    edit: My system only selects file menu, but does not display it.

  3. #3

    Thread Starter
    Frenzied Member HanneSThEGreaT's Avatar
    Join Date
    Nov 2003
    Location
    Vereeniging, South Africa
    Posts
    1,492

    Re: Menubar popup when F10 is pressed

    That's what I mean, yes.

    Any ideas ¿
    VB.NET MVP 2008 - Present

  4. #4
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    342

    Re: Menubar popup when F10 is pressed

    This will disable it in your program:

    VB Code:
    1. Private Sub Form_Load
    2.  
    3.   Me.KeyPreview = True
    4.  
    5. End Sub
    6.  
    7. Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
    8.  
    9.   If KeyCode = vbKeyF10 Then
    10.    
    11.     KeyCode = 0
    12.  
    13.   End If
    14.  
    15. End Sub
    16.  
    17. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    18.  
    19.   If KeyCode = vbKeyF10 Then
    20.    
    21.     KeyCode = 0
    22.  
    23.   End If
    24.  
    25. End Sub

  5. #5

    Thread Starter
    Frenzied Member HanneSThEGreaT's Avatar
    Join Date
    Nov 2003
    Location
    Vereeniging, South Africa
    Posts
    1,492

    Re: Menubar popup when F10 is pressed

    Hahaha, I'm so STUPID!! Man, I've been trying System Hooks, even tried the GetMenu API's.
    Man I am just so stupid!!

    Beleive it or not, I'm better than this

    Hahaha

    You've made my day!

    HanneSThEStupiD!
    VB.NET MVP 2008 - Present

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