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??
ADAdministrator Syncfusion Team June 8, 2004 11:43 AM
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");
Please refer to the sample attached that illustrates this. Hope this helps.
RMRoland MartinJune 8, 2004 02:59 PM
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
RMRoland MartinJune 10, 2004 07:56 AM
Should I open a Direct-Trac problem for this??
ADAdministrator Syncfusion Team June 10, 2004 08:16 AM
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.