Click here to Skip to main content
15,902,938 members
Home / Discussions / C#
   

C#

 
GeneralRe: SearchDirectory Pin
Bernhard Hiller3-Jun-13 21:10
Bernhard Hiller3-Jun-13 21:10 
GeneralRe: SearchDirectory Pin
HubSnippets10-Jun-13 0:20
HubSnippets10-Jun-13 0:20 
QuestionSending messages to a listbox's context menu. Pin
Septimus Hedgehog2-Jun-13 22:28
Septimus Hedgehog2-Jun-13 22:28 
AnswerRe: Sending messages to a listbox's context menu. Pin
DaveyM693-Jun-13 0:15
professionalDaveyM693-Jun-13 0:15 
GeneralRe: Sending messages to a listbox's context menu. Pin
Septimus Hedgehog3-Jun-13 0:46
Septimus Hedgehog3-Jun-13 0:46 
AnswerRe: Sending messages to a listbox's context menu. Pin
DaveyM693-Jun-13 0:55
professionalDaveyM693-Jun-13 0:55 
GeneralRe: Sending messages to a listbox's context menu. Pin
Septimus Hedgehog3-Jun-13 1:00
Septimus Hedgehog3-Jun-13 1:00 
GeneralRe: Sending messages to a listbox's context menu. Pin
DaveyM693-Jun-13 1:10
professionalDaveyM693-Jun-13 1:10 
Is there any reason you need to do this using SendMessage as it looks like it's going to get quite complex.

If you can, in order of preference:
1. Just call the method that handles the MenuItem's Click directly
C#
testToolStripMenuItem_Click(null, EventArgs.Empty);

2. use the MenuItem's index and call PerformClick()
C#
int itemIndex = 0;
listBox1.ContextMenuStrip.Items[itemIndex].PerformClick();

Dave

Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.
Astonish us. Be exceptional. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)



GeneralRe: Sending messages to a listbox's context menu. Pin
Septimus Hedgehog3-Jun-13 1:54
Septimus Hedgehog3-Jun-13 1:54 
GeneralRe: Sending messages to a listbox's context menu. Pin
BobJanova3-Jun-13 4:06
BobJanova3-Jun-13 4:06 
GeneralRe: Sending messages to a listbox's context menu. Pin
Septimus Hedgehog3-Jun-13 5:53
Septimus Hedgehog3-Jun-13 5:53 
QuestionRun-time video editing Pin
yassine7072-Jun-13 14:55
yassine7072-Jun-13 14:55 
AnswerRe: Run-time video editing Pin
Richard MacCutchan2-Jun-13 20:51
mveRichard MacCutchan2-Jun-13 20:51 
QuestionHow to Open Cash Drawer Pin
Jassim Rahma2-Jun-13 10:26
Jassim Rahma2-Jun-13 10:26 
AnswerRe: How to Open Cash Drawer Pin
dusty_dex2-Jun-13 11:04
dusty_dex2-Jun-13 11:04 
GeneralRe: How to Open Cash Drawer Pin
Jassim Rahma2-Jun-13 11:17
Jassim Rahma2-Jun-13 11:17 
GeneralRe: How to Open Cash Drawer Pin
dusty_dex2-Jun-13 22:08
dusty_dex2-Jun-13 22:08 
AnswerRe: How to Open Cash Drawer Pin
dusty_dex3-Jun-13 2:02
dusty_dex3-Jun-13 2:02 
QuestionBinary Validation File Pin
Jassim Rahma2-Jun-13 10:25
Jassim Rahma2-Jun-13 10:25 
AnswerRe: Binary Validation File Pin
Mycroft Holmes2-Jun-13 11:53
professionalMycroft Holmes2-Jun-13 11:53 
AnswerRe: Binary Validation File Pin
BobJanova3-Jun-13 4:08
BobJanova3-Jun-13 4:08 
QuestionSocket Programming Pin
itprs2-Jun-13 4:58
itprs2-Jun-13 4:58 
AnswerRe: Socket Programming Pin
Dave Kreskowiak2-Jun-13 7:45
mveDave Kreskowiak2-Jun-13 7:45 
GeneralRe: Socket Programming Pin
Septimus Hedgehog3-Jun-13 2:01
Septimus Hedgehog3-Jun-13 2:01 
GeneralRe: Socket Programming Pin
Pete O'Hanlon3-Jun-13 2:27
mvePete O'Hanlon3-Jun-13 2:27 

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.