Create something of ContextMenuStripItem type ????

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
 
S

Sericinus hunter

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top