Results 1 to 7 of 7

Thread: adding to the menu[RESOLVED]

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    Resolved adding to the menu[RESOLVED]

    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?
    Last edited by high6; Oct 19th, 2005 at 03:19 PM.

  2. #2
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: adding to the menu???

    Do you want to add these menus to your program or to an external program?


    Has someone helped you? Then you can Rate their helpful post.

  3. #3
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: adding to the menu???

    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.


    Has someone helped you? Then you can Rate their helpful post.

  4. #4
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: adding to the menu???

    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:
    1. Option Explicit
    2.  
    3. Private nMenus As Integer
    4.  
    5. Private Sub Command1_Click()
    6. nMenus = nMenus + 1
    7. Load mFile(nMenus)
    8. With mFile(nMenus)
    9.     .Caption = Text1
    10.     .Visible = True
    11. End With
    12.  
    13. End Sub

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    Re: adding to the menu???

    Quote Originally Posted by moeur
    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:
    1. Option Explicit
    2.  
    3. Private nMenus As Integer
    4.  
    5. Private Sub Command1_Click()
    6. nMenus = nMenus + 1
    7. Load mFile(nMenus)
    8. With mFile(nMenus)
    9.     .Caption = Text1
    10.     .Visible = True
    11. End With
    12.  
    13. End Sub
    well thats getting somewhere but i want it in mfile not next to

  6. #6
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: adding to the menu???

    OK, then just add a submenu to mFile and make it the array
    VB Code:
    1. Private Sub Command1_Click()
    2. nMenus = nMenus + 1
    3. Load mSubFile(nMenus)
    4. With mSubFile(nMenus)
    5.     .Caption = Text1
    6.     .Visible = True
    7. End With
    8.  
    9. End Sub

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    Re: adding to the menu???

    Quote Originally Posted by moeur
    OK, then just add a submenu to mFile and make it the array
    ok thank you very much

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width