1
Answer

How to make "ContextMenu" disappear on Keypress Event?

Ask a question
sasikumar

sasikumar

12y
2k
1
Hi,

I've a ContextMenu in my Form. After clicking multiple items with sub-menu, finally it comes to ToolStripTextBox. I enter some text and press "Enter". The KeyPress event verifies that the "Enter" key was pressed and does the required actions without any issues.

Now the issue is, the expanded ContextMenu with the sub-menu and the ToolStripTextBox is still visible on the Form. How can I make the "ContextMenu" disappear on verifying that the "Enter" key was pressed?

Thanks,
SK

Answers (1)