Click here to Skip to main content
15,920,602 members
Home / Discussions / C#
   

C#

 
GeneralRichTextBox question.. Pin
Fredrik7924-Jan-04 9:08
Fredrik7924-Jan-04 9:08 
GeneralRe: RichTextBox question.. Pin
Mazdak24-Jan-04 10:10
Mazdak24-Jan-04 10:10 
GeneralRe: RichTextBox question.. Pin
Nick Parker25-Jan-04 5:45
protectorNick Parker25-Jan-04 5:45 
GeneralRe: RichTextBox question.. Pin
Fredrik7925-Jan-04 5:58
Fredrik7925-Jan-04 5:58 
GeneralRe: RichTextBox question.. Pin
Nick Parker25-Jan-04 7:41
protectorNick Parker25-Jan-04 7:41 
Generalchecking dynamically which control is clicked Pin
Inam24-Jan-04 6:41
Inam24-Jan-04 6:41 
GeneralRe: checking dynamically which control is clicked Pin
Alex Korchemniy24-Jan-04 6:56
Alex Korchemniy24-Jan-04 6:56 
GeneralRe: checking dynamically which control is clicked Pin
Dmitriy Kostovetskiy24-Jan-04 13:32
Dmitriy Kostovetskiy24-Jan-04 13:32 
If I understand you correctly, you need to know control which triggered context menu when you handle MenuItem.Click event. When you handle this event sender is a context menu so it wont't help you much. However, if you handle ContextMenu.Popup sender is the control triggering the event. What you can do is this: create a field in the class where you handle events

object controlWhichTriggeredEvent;

Then create a handler for ContextMenu.Popup:

private void YourContextMenu_Popup(object sender, System.EventArgs e)
{
    controlWhichTriggeredEvent = sender;
}


Now when you handle MenuItem.Click , controlWhichTriggeredEvent will contain the latest control clicked by user (you will have to cast it to label of any other control).
GeneralIgnore Keyboard And mouse input Pin
SherKar24-Jan-04 2:31
SherKar24-Jan-04 2:31 
GeneralRe: Ignore Keyboard And mouse input Pin
Mazdak24-Jan-04 3:09
Mazdak24-Jan-04 3:09 
GeneralTrouble extracting objects from HashTable Pin
Peter Mills24-Jan-04 1:51
Peter Mills24-Jan-04 1:51 
GeneralRe: Trouble extracting objects from HashTable Pin
Colin Angus Mackay24-Jan-04 4:11
Colin Angus Mackay24-Jan-04 4:11 
GeneralRe: Trouble extracting objects from HashTable Pin
Peter Mills24-Jan-04 4:48
Peter Mills24-Jan-04 4:48 
GeneralAdding scaner funtionality to C# application Pin
Chathura23-Jan-04 12:34
Chathura23-Jan-04 12:34 
GeneralRe: Adding scaner funtionality to C# application Pin
Heath Stewart23-Jan-04 18:02
protectorHeath Stewart23-Jan-04 18:02 
GeneralRe: Adding scaner funtionality to C# application Pin
cjengler24-Jan-04 2:25
cjengler24-Jan-04 2:25 
QuestionWhat is a cheap compiler for C#. Pin
Snyp23-Jan-04 12:10
Snyp23-Jan-04 12:10 
AnswerRe: What is a cheap compiler for C#. Pin
Colin Angus Mackay23-Jan-04 12:44
Colin Angus Mackay23-Jan-04 12:44 
AnswerRe: What is a cheap compiler for C#. Pin
Guillermo Rivero23-Jan-04 17:35
Guillermo Rivero23-Jan-04 17:35 
AnswerRe: What is a cheap compiler for C#. Pin
Heath Stewart23-Jan-04 18:00
protectorHeath Stewart23-Jan-04 18:00 
GeneralRe: What is a cheap compiler for C#. Pin
OmegaSupreme25-Jan-04 3:38
OmegaSupreme25-Jan-04 3:38 
AnswerRe: What is a cheap compiler for C#. Pin
extremeg24-Jan-04 3:06
extremeg24-Jan-04 3:06 
General.Net Remoting store serialization file Pin
krisp23-Jan-04 11:23
krisp23-Jan-04 11:23 
GeneralRe: .Net Remoting store serialization file Pin
Heath Stewart23-Jan-04 18:22
protectorHeath Stewart23-Jan-04 18:22 
GeneralRe: .Net Remoting store serialization file Pin
krisp23-Jan-04 19:06
krisp23-Jan-04 19:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.