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.
Menu name control properties
Collapse
X
-
Try this quick exercise.Originally posted by DodongI 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.
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
-
Sorry, my last experience with MDI forms was probably more than ten years ago.Originally posted by DodongHi 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
Comment