c# - Determine control on which context menu was opened -


this question has answer here:

i have winform application tekstbox controls connected contextmenustrip. if rightclick on textbox context menu (of course) opened. far can see contextmenustrip events don't give info control on context menu opened.

i can't use work-around looking @ focused control, rightclick doesn't give focus textbox (if hasn't have focus before rightclick).

so question is: how can determine control on context menu opened?

contextmenu has sourcecontrol property should able use :)


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -