Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 978779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:06:44+00:00 2026-05-16T04:06:44+00:00

In my main application Form I have a number of menu and toolbar button

  • 0

In my main application Form I have a number of menu and toolbar button functions to which I have assigned shortcut keys such as F10, F11 and F12. The shortcuts work well except for instances where certain controls have focus, such as a 3rd-party grid control. In that case the F11 or other shortcuts are handled by that control and swallowed… they never make it to my event handler of the main UI.

I don’t really want to, and can’t with the 3rd party controls, modify each control (there are dozens) to pass on my F* keys. I thought of hooking the app’s message pump but that seems like a severe solution. Is there a better, cleverer way to handle this situation?

(This is a .NET WinForms MDI (2.0) application which hosts many kinds of home-spun as well as 3rd party components.)

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T04:06:45+00:00Added an answer on May 16, 2026 at 4:06 am

    Here is what I tried:

    • Overrides Sub WndProc
    • Overrides Function ProcessKeyPreview
    • IMessageFilter.PreFilterMessage

    None of these worked although either one should have. It’s my suspicion that the offending child control does something similar and is not playing nice. It’s an old Win32 OCX and might actually be doing something really nasty such as hooking into the messages at the OS level. Not sure.

    In any case, the workaround was to use Alt + SomeOtherKey. For whatever reason, using Alt + D instead of F11 allows the message handling and focus/view change to take place properly.

    This solution is a hack around a 3rd-party control and a genuine black-box issue. I wish I knew exactly what was going on but I don’t though I suspect that the 3rd party control has its own hooks into the message pump and is intercepting the F*-keys.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a C# windows application which does the following: 1) the main form
I have a WinForm application. On the main form there are a number of
In my current application I have a main form: frmMain with a statusstrip and
I have WPF Application where I have One main form and other user controls
I have a Delphi application that has a document browser as the main form.
Scenario I have a Windows Forms Application. Inside the main form there is a
I have my main application delegate which contains a method that returns an object.
I have a single page application which create and remove a number of iframe
I am using a System.Windows.Forms.Timer component on an application's main form which checks every
I have a windows form application. On the main form a user will enter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.