How to tell what form control a context menu was over when you clicked one of its items.

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<span style="font-size:small <span>I have 10 textboxes on a windows form. Each textbox has the same contextmenu. Say they are named textbox1 - textbox10. What I need is when I right click in one of the textboxes I need to capture the name of the textbox
in which the contextmenu was called. So if I am over textbox2 and right click for contextmenu then select menu item #2 in the click event I need to capture the textbox control I called the contextmenu from (textbox2) so I can send that
name to a function to process my other code. <hr class="sig George - www.ipdg3.com

View the full article
 
Back
Top