J
John Google
Hi,
I'm using VS2005 .NET 2.0.
I want to have a single context menu on a form and link it to various
controls via the ContextMenuStrip property of each control. Then I want
to dynamically modify the context menu depending upon which control
caused the context menu to be displayed via the right mouse button..
I've got the code to dynamically modify the menu working OK by hooking
into the contextMenuStrip.Opening event. However, I have not yet found
of a way to determine which control caused the context menu to be
displayed.
Can this be done?
TIA
John.
I'm using VS2005 .NET 2.0.
I want to have a single context menu on a form and link it to various
controls via the ContextMenuStrip property of each control. Then I want
to dynamically modify the context menu depending upon which control
caused the context menu to be displayed via the right mouse button..
I've got the code to dynamically modify the menu working OK by hooking
into the contextMenuStrip.Opening event. However, I have not yet found
of a way to determine which control caused the context menu to be
displayed.
Can this be done?
TIA
John.