I am using the ToolStripDropDown control to host an user control to simulate the pop-up window behavior but encountered the strange problem which I am unable to solve. The ToolStripDropDown control has a ContextMenuStrip attached to it (or some child control does) but when this ContexMenuStrip is shown, the parent ToolStripDropDown pop-up window is closed. When I use the ContextMenu class (which is deprecated and replaced by the ContextMenuStrip) the problem does not occure and the ToolStripDropDown window is not closed.
I thought there is some problem with the WM_ACTIVATE notification and tried to subclass the ContextMenuStrip to force the WS_EX_NOACTIVATE in the CreateParams but no improvement there. I have also tried to manipulate the Closing event but this resulted that the ToolStripDropDown did not closed properly as it already had lost the activation when the ContextMenuStrip was opened.
What is the difference between the ContextMenu and ContextMenuStrip and is there any solution to this problem or any workaround?
Thanks for an answer.
View Complete Post