How to add Menus to MDI Form during run time in VB 6.0?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • praveenhathwar
    New Member
    • Jun 2008
    • 10

    How to add Menus to MDI Form during run time in VB 6.0?

    Hi to all,
    I have added an MDI Form. Now I need to call the Menus that are in the database for respective User. My table's fields are as follows:
    UserId
    MenuName
    Status

    I have to display only those menus whose status is active for the particular(logg ed) user.

    Actually there is a application with this feature running. But I dont ve source code. I need to develop the whole application. So I need help....
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    u can design the menus at designtime and enable / disable them at run time.

    Comment

    • praveenhathwar
      New Member
      • Jun 2008
      • 10

      #3
      Originally posted by debasisdas
      u can design the menus at designtime and enable / disable them at run time.

      Ya, I know that procedure.. But the requirement is to fetch those names from the table only... I should not include them in the Design Part.... Plz Help

      Comment

      • 9815402440
        New Member
        • Oct 2007
        • 180

        #4
        hi
        make control array of a menu and use load statement to load menus at runtime.
        e.g. Load mnu(1)
        mnu(1).Visible = True
        mnu(1).caption = "my Caption"

        regards
        manpreet singh dhillon

        Comment

        • praveenhathwar
          New Member
          • Jun 2008
          • 10

          #5
          Originally posted by 9815402440
          hi
          make control array of a menu and use load statement to load menus at runtime.
          e.g. Load mnu(1)
          mnu(1).Visible = True
          mnu(1).caption = "my Caption"

          regards
          manpreet singh dhillon

          Can you explain it in depth?
          Bcoz I need to take the Caption from the table. While this is the case, how can I add Name(Name = Below Caption in the Menu Editor in the MDIForm) to a particular Caption ?

          Comment

          Working...