how would i add a button to the menu like theres file and some some stuff under file how would i type in text1.text hit a button and it adds it to the menu under file?
Printable View
how would i add a button to the menu like theres file and some some stuff under file how would i type in text1.text hit a button and it adds it to the menu under file?
Do you want to add these menus to your program or to an external program?
If it's your application, you can have a control array of menus and make your life a lot easier. If it's not (or even if it is) you can use the AppendMenu API.
here is an example of using an array
create a project, add a textbox and command button
add a menu called mFile and set it's index property to 0
VB Code:
Option Explicit Private nMenus As Integer Private Sub Command1_Click() nMenus = nMenus + 1 Load mFile(nMenus) With mFile(nMenus) .Caption = Text1 .Visible = True End With End Sub
well thats getting somewhere but i want it in mfile not next toQuote:
Originally Posted by moeur
OK, then just add a submenu to mFile and make it the arrayVB Code:
Private Sub Command1_Click() nMenus = nMenus + 1 Load mSubFile(nMenus) With mSubFile(nMenus) .Caption = Text1 .Visible = True End With End Sub
ok thank you very much :)Quote:
Originally Posted by moeur