VB.net ContextMenu is not Updating - vb.net

I have a project I converted from VS 2008 to VS 2015 and I am having an issue with the context menu's items not updating their text when the program runs. For instance, I have an item named "Quick Dig" and I need to change it to "Quick Hitch". It shows up fine on the context menu and in the properties of the context menu, but when I run the program it still shows "Quick Dig". Similarly, when I try and add items to the context menu, the new items do not show up either. They show up fine in the context menu and in the properties, but again, when I run the program, it doesn't have them included.
How can I get the context menu to update the new text and also include the additions I am making? Nothing I have tried has helped...

Related

VS 2019 Visual Basic navigation bar class list not refreshing when selecting

I recently installed VS 2019 Preview, and i'm facing this issue:
In my VB code editor, in the navigation bar, when i try to choose a class (button, dropdowlist,...) it's not working: the list of classes it's not refreshing, the class i tried to select is not selected, so i can't be able to edit/create an event for the class i need to edit. I manually have to search for the event, or to create it manually.
Is it malfunction of the Editor? is it a bad configuration? or do i need to re-install VS 2019 ...?
Thanks in advance, looking forward for your comments on above.
I am not sure why your chose the Preview edition. I never used it. I have the latest VS 2019. In my version I can choose any control on the form in the middle drop down and the events for that control appear in the right drop down.
Another way to add the stub for an event procedure. Is available in Design View. Select a control and view the properties window. On the toolbar choose the lightning bolt. All the events for that control are listed. Double click on the event you want and the stub will be inserted in the code editor.
Of course, you can always just type in the event procedure, as long as it has the correct signature and handles clause, it will work.

Remove Items from Windows Textbox Context Menu in Vb.net

I am working on a Vb.net 2010 and I have created a User Control Text Box which has default Windows Context menu but I have to remove some items from context menu.Items like Right to Left Reading Orders etc. have to remove it and also for that I don't want to create my context menu please keep that in mind.

How can I locate a UI element in VB6 code?

I have no experience with VB, but I have looked around a decent amount and cannot figure this out.
I am currently recreating a VB6 application to a VB.net application. There are a bunch of elements that are hidden until certain options are chosen. Obviously, not having the element created on the form gives me this error:
Looking at the VB6 environment, I find the mDNP variable in the drop down menu on the right, but it does not tell me where it is located, or what type of UI element it is. It says Menu next to it, but I have gone through all of the menus and cannot find it anywhere.
The issue of hidden elements is not the cause of the error; even if not visible, they must exist. More likely, you havent yet (re)created that VB6 object in the new NET project code (especially if you cannot find it in VB6).
Menus were odd in VB6 and used a special editor rather than just being a component or control you added. mDNP likely relates to a drop down menu list/window. To find all these creatures in VB6:
Open the form designer
Right Click
Select Menu Editor
There is also a toolbar button, but it may missing as a result of customization:
This will show all the menu elements for this form including ones which might be set to invisible to be later invoked as PopUps or context menus in today's lingo. There is no indicator that a form has a menu (like the form tray components in .NET) other than opening the Menu Editor.

Deleting menu item results index error ("source not found")

In VB.Net 2010, whenever I delete a menu item on a Windows Form (a Mainmenu1 object), an exception is thrown at run-time suggesting that there is an index value missing -- essentially a "source not found" error. Do I need to go into the Mainmenu1 object on the bottom of the Form at design time and do something? (BTW, I have also tried deleting the source code for the menu item, and then the menu item, and the exception is still thrown).
Basically, something is occurring that is not allowing me to simply delete a menu item, and get a successful run thereafter.
I had this problem. The simple fix is to restore the menu by clicking undo. Then run the code to make sure it still works. When you have done this, CLOSE visual studio. Then open VS and load your project. Delete the item from the menu and run the project. Everything should be fine
I think you need to specify whether you were trying to delete the menu or menu item during run time, or during design time.
You said, an exception, indicating an index value was missing, thrown at run time. I think it might be depending on how you deleted the menu item. You didn't mention how you deleted the menu item.
Normally, when you choose a menu item from a menu at design time, and press the Delete key, it disappeared. And, the program still works fine.
And, another possibility, is that your form window designer and the background designer code is not properly synced.
You might know that, every .NET form objects, have their background designer code, which serves as a schema for everything on the form.
When you add a button onto the form, the Visual Studio add a line of code in the designer code file (normally if your form name is form1, the designer code file is form1.designer.vb or cs or whatever). When you change the background colour of the button, designer code file add a line of code to set the button's background colour.
So, you see, in your case, when you delete the menu item, your designer code file probably didn't successfully remove the code relating to that menu item. So, it throws an exception at run time.
Maybe, it's because of your Visual Studio installation.
So, my suggestion is, you should try debugging the project, line by line, by running the project with F6 or F11 (sorry, I don't remember the exact key, but you can find it in the Debug menu).
I hope I made a good sense for your problem!

ASP.NET Dropdown Menu not refreshing data

I am constructing an ASP.NET Menu using an asp:XmlDataSource and setting the Data property and binding the Menu. Everything works well until I have to change the menu. For instance when I remove a menu item from the xml and set the Data to a new xml string and rebind the menu. The item is missing from the datasource but still shows up in the menu. I double check to make sure it is not a refresh problem by doing a Menu.FindItem with the path to the item , which still shows up in the menu. I have even opened the page in another bowser and the item still shows up, so it must be a server issue.
Is there some chaching on the server that needs to be reset or what am I missing?
I will solve my own issue.
The thread at: http://forums.asp.net/t/1239541.aspx/1/10 showed that the xmldatasource has the EnableCaching set to true by default, so even though I was changing the Data property the changes were never making it to the menu.