Menu name control properties

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dodong
    New Member
    • Oct 2006
    • 14

    #1

    Menu name control properties

    I am new to vb6 programming. I would like to know the code on how to change the menu name control properties at run time. For example I want to disable visibility of File/open when a certain condition exists.
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Originally posted by Dodong
    I am new to vb6 programming. I would like to know the code on how to change the menu name control properties at run time. For example I want to disable visibility of File/open when a certain condition exists.
    Try this quick exercise.
    Create a new form. Using the Menu Editor, create an entry with any caption you like, and name "aaa". Hit OK.

    You can now deal with the object called "aaa" just like any other object. For example...
    On the form, click the "aaa" menu which has now appeared. You will be in the Sub for the Click event for the "aaa" menu item (this is not important, it was just a quick and convenient way to get to the code editor). Type in "aaa." - as soon as you hit the dot, if your options are set appropriately, you will get a popup list of the parameters of the menu item "aaa". This should make it fairly evident how to play with the menu item.
    To continue the example further, you could do something like:
    Code:
    aaa.Enabled = False

    Comment

    • Dodong
      New Member
      • Oct 2006
      • 14

      #3
      Hi Killer42,

      Thanks for your reply to post. I forgot to mention that I will be apply this to an MDI form, and your suggestion applies only to an SDI form. Thanks anyway.

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Originally posted by Dodong
        Hi Killer42,

        Thanks for your reply to post. I forgot to mention that I will be apply this to an MDI form, and your suggestion applies only to an SDI form. Thanks anyway.
        Sorry, my last experience with MDI forms was probably more than ten years ago.

        Comment

        Working...