I have a Windows Forms application, written in VB.NET framework 2.0.
I have a grid that has an associated context menu with the following structure :
MenuItem1
MenuItem2 -->
SubMenuItem1
SubMenuItem2 -->
SubSubMenuItem1
MenuItem3
...
I wish to display the context menu when a particular key is pressed within the grid, and have the 'SubMenuItem1'
selected programmatically.
I can display the context menu by invoking the Show() method on the context menu item from the grid's KeyUp
event in the following manner:
contextMenu.Show(MainForm.GetSingleton(), Cursor.Position)
I can't however figure out how to programmatically select an item in the sub menu or sub sub menu.
Can anyone help?