We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Supressing F10 jump to menu bar

I have a UserControl in a child MDI Form which needs complete control over the function keys. Everythings works fine except F10 which always jumps to the menu bar. Is there are way in 1.6.1 to stop F10 from going to the menu bar?? Thanks, Roland Martin

4 Replies

Administrator June 8, 2004 03:43 PM UTC

Hi Roland, You could override the ProcessCmdKey method for the UserControl and capture the ''F10'' key there as shown in the code below : protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == Keys.F10) { MessageBox.Show("F10 captured by UserControl"); } return true; } Please refer to the sample attached that illustrates this. Hope this helps. Regards, Guru Patwal Syncfusion, Inc.

RM Roland Martin June 8, 2004 06:59 PM UTC

Your solution does not work with 1.6.1 and a form having a real XP Style main menu bar. I have already tried this approach and yes I can still get the F10 but focus is ALWAYS given to the XP Style main menu bar, just as the Alt-key also gives the menu bar focus. I want total control over F10 (and Alt) with a real XP Style main menu bar, ie, I don''t want focus being given to the menu bar after I process the F10 or Alt. Your sample also had the following: this.mainFrameBarManager1.Style = Syncfusion.Windows.Forms.VisualStyle.Office2003; I assume this property is in release 2? Please try to create a sample using the Syncfusion.Windows.Forms.Tools.XPMenus classes and see if you can find a way around this. I also need total control over the Alt key with XPMenus, is this addressed at all in release 2?? Thanks for the help - Roland

RM Roland Martin June 10, 2004 11:56 AM UTC

Should I open a Direct-Trac problem for this??

Administrator June 10, 2004 12:16 PM UTC

Hi Roland, The MainFrameBarManager''s Style property is a feature of our v2.0 release, and the earlier versions do not have this. I have tested for this issue here and do see that the focus is indeed transferred to the XPMenus when the Alt key is pressed. I would appreciate if you could open a DirectTrac incident in this regard. We appreciate your cooperation. Regards, Guru Patwal Syncfusion, Inc.
Loader.
Live Chat Icon For mobile
Up arrow icon