Context menu strips event sources?
-
Hello! I am trying to implement a context menu for several different controls (more than one control have the same context menu) in C#.NET 2.0. In .NET 1.1 we could just compare the 'sender' parameter in order to see which control has actually displayed the context menu and issued the command. But in .NET 2.0 I get a reference to the tool strip item of the context menu in 'sender'... How to see which control has actually used the context menu? :confused: I already tried several different ways (like checking the controls with .Focused, etc.), but nothing worked :( Best regards Dominik
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) (doesn't work on NT) -
Hello! I am trying to implement a context menu for several different controls (more than one control have the same context menu) in C#.NET 2.0. In .NET 1.1 we could just compare the 'sender' parameter in order to see which control has actually displayed the context menu and issued the command. But in .NET 2.0 I get a reference to the tool strip item of the context menu in 'sender'... How to see which control has actually used the context menu? :confused: I already tried several different ways (like checking the controls with .Focused, etc.), but nothing worked :( Best regards Dominik
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) (doesn't work on NT)See if the eventargs parameter has an index property - I ran into the same kind of issue with a tab control (trying to determine which tab page generated the event) and found e.Index held the answer. dpb Darryl Borden Principal IT Analyst dborden@eprod.com