Check for event in event queue
Posted on 2006-11-16
When a context menu item is clicked, the click event isn't handled immediately. Instead, the context menu is dismissed, subsequent statements (statements following the calling of the Show method of the menu) are executed, and only then the menuitem's click event is handled.
I need that, immedately after calling Show, before any other statement is executed, to determine if a certain menuitem was clicked.
I thought of checking whether the click event of the menuitem is in the event queue, but how to do that? Or maybe there is another solution?