many listviews, one common context menu strip

D

Dean Slindee

VS2008: I have one context menu strip connected to several listviews. In
the code in the context menu_Click , I would like to know which of several
listviews was used to invoke the context menu item. Is this possible?

Thanks in advance
Dean Slindee
 
J

Joe Cool

VS2008: I have one context menu strip connected to several listviews. In
the code in the context menu_Click , I would like to know which of several
listviews was used to invoke the context menu item. Is this possible?

I've never tried this but doesn't the sender property tell you that?
 
J

Joe Cool

VS2008: I have one context menu strip connected to several listviews. In
the code in the context menu_Click , I would like to know which of several
listviews was used to invoke the context menu item. Is this possible?

I've never tried this but doesn't the sender property tell you that?
 
A

Armin Zingler

Dean said:
VS2008: I have one context menu strip connected to several listviews.
In the code in the context menu_Click , I would like to know which of
several listviews was used to invoke the context menu item. Is this
possible?

See ContextMenuStrip's SourceControl property.


Armin
 
A

Armin Zingler

Dean said:
VS2008: I have one context menu strip connected to several listviews.
In the code in the context menu_Click , I would like to know which of
several listviews was used to invoke the context menu item. Is this
possible?

See ContextMenuStrip's SourceControl property.


Armin
 

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