473,322 Members | 1,398 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Menu name control properties

14
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.
Oct 16 '06 #1
3 1770
Killer42
8,435 Expert 8TB
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:
Expand|Select|Wrap|Line Numbers
  1. aaa.Enabled = False
Oct 18 '06 #2
Dodong
14
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.
Oct 18 '06 #3
Killer42
8,435 Expert 8TB
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.
Oct 19 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Salad | last post by:
A97. If you set a forms properties to ShortcutMenu = No, the entire form is disabled from displaying a shortcut menu. If you set the property to Yes, all controls have a shortcut menu. I have...
3
by: Sachin D. | last post by:
In VB.net menus, there is a name property, but it isnt available in runtime..strange!!! does someone has a idea how i can do something similar? reason i want it is...in my app the UI text...
20
by: MARLON LA ROSE | last post by:
CAN ANYONE TELL ME HOW I GET THE ACTUAL OBJECT OF A MENU ITEM. IS THERE A FILTER OR SOMETHING THAT I CAN USE. I HAVE BEEN FIGHTING WITH THIS FOR ABOUT 4 HOURS NOW AND I END UP GETTING THE SAME...
5
by: dpomt | last post by:
When the ASP.NET menu is rendered on downlevel browers, the text "^ up one level" is displayed. Any ideas how I can change that text? I did not find a property for the menu control where I can...
1
by: R.A.M. | last post by:
Hello, I need your help with a problem of menu definition. Plase help, I have little experience. I have created custom Menu, which I want to put on a few .aspx pages: public class DemoMenu :...
5
by: james | last post by:
Hello, I am having a little trouble creating an event handler for a context menu toolstripmenuitem. I've seen various tutorials and so on, but I keep getting a bit stuck! So far I have a second...
1
by: stinehelferw | last post by:
I need a right-click menu on a form list control with combobox controls. I used View->Toolbars->Customize to create a toolbar. I added ComboBox through commands tab. I set properties to Popup...
3
by: John | last post by:
Hi there, I was reading an article (http://avenuea-razorfish.com/articles/TheAll-MenuNavigation_Turbek.pdf) on 'all-menu navigation' and I'd like to try and implement this in my site. Can...
4
by: PW | last post by:
Hi, What is one and does Access 2003 have one? Or how would I create one? I would like the user to be able to right-click on a form or a control on a form and have a menu that offers to go to a...
16
by: stevedude | last post by:
CSS newbie again. I have a problem trying to get coffee mug images within anchor tags to center with my link text for a vertical list menu. If I use the horizontal/vertical properties of...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.