-
In an MDI form you can have several windows open.
Often, there is a menu option "Window" and if it is selected a list of open documents is displayed with a checkmark next to the active document.
Like in Word... you have
Window
New Window
Arrange All
Split
----separator
Here is a list of open documents.
How is this list created?
I was thinking you can't add menu items dynamically.
Thanks!
-
Code:
'From Megatron
'Make a menu called mnuTest with a SubMenu called mnuSub.
'Make sure that that Index property for it is set to 0.
'Now insert this code into a CommandButton on the Form.
Private Sub Command1_Click()
Load mnuSub(mnuSub.Count) ' Loads another menu
MyInt = mnuSub.Count - 1 ' Get the Index for the menu
mnuSub(MyInt).Caption = Text1.Text ' Set the caption to whatever is in the TextBox.
End Sub
That should get you started.