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

Re: Create something of ContextMenuStripItem type ???? by Sericinus

Sericinus
Wed Apr 05 12:02:01 CDT 2006

poppy wrote:
> 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.