P
PAzevedo
With ToolStripMenuItem objects i created a 'Tools' menu and from that
menu droped an Item to which i assigned a ShortcutKey of 'Keys.Control
| Keys.E', and the shortcut doesn't work.
This ToolStripMenuItem is inside a Form, i tryed with different
shortcuts and some work, some don't.
For instance, 'Keys.Control | Keys.R' doesn't work either.
Is anyone familiar with this problem?
MenuStrip msMenu = new MenuStrip();
msMenu.Parent = this;
ToolStripMenuItem miFile = new ToolStripMenuItem("&File");
ToolStripMenuItem miTools = new ToolStripMenuItem("&Tools");
ToolStripMenuItem miExit = new ToolStripMenuItem("E&xit", null, new
EventHandler(miExitOnClick));
ToolStripMenuItem miInsert = new ToolStripMenuItem("&Insert", null, new
EventHandler(miInsertOnClick));
miInsert.ShortcutKeys = Keys.Control | Keys.I;
ToolStripMenuItem miEdit = new ToolStripMenuItem("&Edit", null, new
EventHandler(miEditOnClick));
miEdit.ShortcutKeys = Keys.Control | Keys.E;
ToolStripMenuItem miDelete = new ToolStripMenuItem("&Delete", null, new
EventHandler(miDeleteOnClick));
miDelete.ShortcutKeys = Keys.Control | Keys.D;
miFile.DropDownItems.Add(miExit);
msMenu.Items.Add(miFile);
miTools.DropDownItems.Add(miInsert);
miTools.DropDownItems.Add(miEdit);
miTools.DropDownItems.Add(miDelete);
msMenu.Items.Add(miTools);
menu droped an Item to which i assigned a ShortcutKey of 'Keys.Control
| Keys.E', and the shortcut doesn't work.
This ToolStripMenuItem is inside a Form, i tryed with different
shortcuts and some work, some don't.
For instance, 'Keys.Control | Keys.R' doesn't work either.
Is anyone familiar with this problem?
MenuStrip msMenu = new MenuStrip();
msMenu.Parent = this;
ToolStripMenuItem miFile = new ToolStripMenuItem("&File");
ToolStripMenuItem miTools = new ToolStripMenuItem("&Tools");
ToolStripMenuItem miExit = new ToolStripMenuItem("E&xit", null, new
EventHandler(miExitOnClick));
ToolStripMenuItem miInsert = new ToolStripMenuItem("&Insert", null, new
EventHandler(miInsertOnClick));
miInsert.ShortcutKeys = Keys.Control | Keys.I;
ToolStripMenuItem miEdit = new ToolStripMenuItem("&Edit", null, new
EventHandler(miEditOnClick));
miEdit.ShortcutKeys = Keys.Control | Keys.E;
ToolStripMenuItem miDelete = new ToolStripMenuItem("&Delete", null, new
EventHandler(miDeleteOnClick));
miDelete.ShortcutKeys = Keys.Control | Keys.D;
miFile.DropDownItems.Add(miExit);
msMenu.Items.Add(miFile);
miTools.DropDownItems.Add(miInsert);
miTools.DropDownItems.Add(miEdit);
miTools.DropDownItems.Add(miDelete);
msMenu.Items.Add(miTools);