Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MenuItem shortcut not working correctly

Status
Not open for further replies.

gny

Programmer
Jun 3, 2001
116
SE
Hi,

I have a form which I use as an MDI child.
When the menu in the child has merged with that of the MDI parent the merged menu something like this:

--File [from MDI parent]
|
--CurrentObject [from MDI child]
|
-- Undo (Ctrl+U)

When i try to use the shortcut key (e.g. Ctrl+U) assigned to one of the MenuItems, the Form does not process the keystroke and nothing happens (and ProcessCmdKey returns false).
However, any subsequent shortcut usage works fine, the non-handling behavior only occurs when i have not yet tried to use a shortcut AND the menuitem has not been shown (parent menuitem popped up). It's as if the Form uses the first attempt to use a shortcut to only build a collection of which shortcuts to handle.

The problem is that for some reason the users don't expect to have to press Ctrl+U TWICE....

Any ideas on what might be wrong/how I can make the first attempted use of the shortcut work?


I am using the .NET 2.0 runtime but still the old MainMenu and MenuItem classes.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top