Create something of ContextMenuStripItem type ????

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

f I can declare a menu item as :

Dim mnuItem As MenuItem

then why cant I declare something of ContextMenuStripItem type.
There is a collection of items for a contextmenustrip.!!

I have a method :
private void NewLoad(object sender, System.EventArgs e)
{
//I need to do something like
MenuItem mn = (MenuItem)sender;
}

In debug when I hover my mouse over "object sender" I get
"[System.Windows.Forms.ContextMenuStrip], Name: contextMenuStrip1, Items: 6}"

I am baffled
 
poppy said:
f I can declare a menu item as :

Dim mnuItem As MenuItem

then why cant I declare something of ContextMenuStripItem type.
There is a collection of items for a contextmenustrip.!!

I have a method :
private void NewLoad(object sender, System.EventArgs e)
{
//I need to do something like
MenuItem mn = (MenuItem)sender;
}

In debug when I hover my mouse over "object sender" I get
"[System.Windows.Forms.ContextMenuStrip], Name: contextMenuStrip1, Items: 6}"

ContextMenuStrip contains items of ToolStripItem type.
 
Back
Top