Does anyone know where I can find an example of how to build a dynamic hierarchical popup menu? I know that it should be simple with judicious use of “Child” menus and the like, but it’s early Sunday and my brain isn’t working quite yet. It will all be built in the MouseDown event. The documentation about this is scarce to non-existant. Thanks.
I have a “Share” button, and when the user clicks on it I want to pop up the something like the following:
Send To >
Open in >
Michel, despite it’s title, that post doesn’t actually talk about multi layer hierarchical dynamic menus. I’ll keep searching…
This did it. I still have to write the code to find all the appropriate applications, etc., and I’ll keep the menus as window properties, this way they can be built only once at launch, but this is the general idea:
Function MouseDown(X As Integer, Y As Integer) As Boolean
Dim mnuPopup As New MenuItem
Dim mnuSendTo As New MenuItem
Dim mnuOpenIn As New MenuItem
Dim selectedMenu As MenuItem
mnuSendTo.Text = "Send To..."
mnuOpenIn.Text = "Open In"
selectedMenu = mnuPopup.PopUp
If selectedMenu <> Nil Then
Select Case selectedMenu.Text
'Do lots of interesting things here...