Results 1 to 2 of 2

Thread: creating menus 'on the fly'.. as it were..

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2000
    Posts
    70

    Question

    Hi,
    I'm after a way to create menus in the code, so i can have a menu, for example 'send to' and submenus of this will be dynamic, based off whatever i choose and create the menus in the code with?
    Thanks
    Daniel Rose
    VB 5.0 Enterprise.
    irc:irc2.dynam.ac

    If TheCodeInTheSig() Is Not Lame() Then IDontKnowWhatIs()

  2. #2
    Guest
    Make a menuitem in the submenu where you want to load the additional menu's, give it a index of 0

    Now for example you called it mnuTest now you can laod additional menu's with

    Load mnuTest(1)
    Load mnuTest(2)
    Load mnuTest(3)
    Load mnuTest(4)
    etc.

    Now you can just edit the properties of your new menu's

    mnuTest(4).Caption = "This is my new menu item (4)"



    Now when someone clicks any of the menus the mnuTest_Click event gets fired, and with the Index you can decide wich one was clicked.

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