Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. List out all menus in vb6 application

List out all menus in vb6 application

Scheduled Pinned Locked Moved Visual Basic
questionhelp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    ssa2010
    wrote on last edited by
    #1

    I have a vb6 application that contain various drop down menus. Some user has not permitted to access some menus. For the purpose Logged in as administrator and list all menus in the application and select a user and check or uncheck whether this user access that menu. But how can I list all menus in the application without manually enter menu name ? Because when we add new menu in the application, I manually add these menu name in list. And If menu no is 100 or 150 then it is difficult to enter the menu name or control them. So I want the code for list all menus in the application automatically. Please help me.

    N C 2 Replies Last reply
    0
    • S ssa2010

      I have a vb6 application that contain various drop down menus. Some user has not permitted to access some menus. For the purpose Logged in as administrator and list all menus in the application and select a user and check or uncheck whether this user access that menu. But how can I list all menus in the application without manually enter menu name ? Because when we add new menu in the application, I manually add these menu name in list. And If menu no is 100 or 150 then it is difficult to enter the menu name or control them. So I want the code for list all menus in the application automatically. Please help me.

      N Offline
      N Offline
      Nick Otten
      wrote on last edited by
      #2

      I'm a little confused to where you refer to drop down controls and drop down item. but the item once can be done pretty easily by code

      dropdownbox.items.add("object, a string as name for example")

      with a loop and some if/else statements you should be able to filter what you add by the users permissions.

      1 Reply Last reply
      0
      • S ssa2010

        I have a vb6 application that contain various drop down menus. Some user has not permitted to access some menus. For the purpose Logged in as administrator and list all menus in the application and select a user and check or uncheck whether this user access that menu. But how can I list all menus in the application without manually enter menu name ? Because when we add new menu in the application, I manually add these menu name in list. And If menu no is 100 or 150 then it is difficult to enter the menu name or control them. So I want the code for list all menus in the application automatically. Please help me.

        C Offline
        C Offline
        ChandraRam
        wrote on last edited by
        #3

        Enumerate all objects of type "Menu" in the form and add it to a list from where an administrator can decide to grant permissions. For instance:

        for each myControl in myForm.Controls
        if typeOf myControl is Menu then

        and so on...

        S 1 Reply Last reply
        0
        • C ChandraRam

          Enumerate all objects of type "Menu" in the form and add it to a list from where an administrator can decide to grant permissions. For instance:

          for each myControl in myForm.Controls
          if typeOf myControl is Menu then

          and so on...

          S Offline
          S Offline
          ssa2010
          wrote on last edited by
          #4

          Ok. thats working.

          Then my next doubt is how can I identify main menus and sub menus

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups