I have a menustrip with several levels of submenus as in below

Client 1
Project 1
Project 1 Task 1
Project 1 Task 2
Project 2
Project 2 Task 1
Project 2 Task 2

Each entry is clickable, even if it has children. In the above example, I can select the Project 2 menu item.

My problem is that when I hover over Project 2, it automatically expands Project 2 Task 1 and Project 2 Task 2. When I click on Project 2 Task 1, the menu "closes up" and all entries disappear which is what I want. However, when I click Project 2, the menu does not "close up" and all of the entries are still visible.

Is there a way to force the menustrip to close back up?

Call the item owner's Hide method. Assuming your Project 2 item above is named Project2ToolStripMenuItem then:

Private Sub Project2ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Project2ToolStripMenuItem.Click
    Project2ToolStripMenuItem.Owner.Hide()
End Sub
This question has already been answered. Start a new discussion instead.