Help removing menu item.
For example in the config I have a line that equals:
Test = "Sample1"
When the program loads and find the line with Test = "Sample1" it will add that item to the drop down menu under File --> Configure --> Sample1
this works perfectly. Now I also have an option to delete this item out of the config file and I am trying to get it to remove from the drop down menu. When you click the delete option you get a dialog box with a drop down that lists the items you can delete from the drop down menu that were loaded from the config file. When you select the item you want to delete and click the delete button I can remove the line from the config but cannot figure out how to remove it from the drop down menu. This is the code I have but wont work so its commented out:
Form1.ConfigureToolStripMenuItem.DropDownItems.Remove(Me.ChainDelete.Text)
With the line above I get the error Error: Value of type 'String' cannot be converted to 'System.Windows.Forms.ToolStripItem'.
ChainDelete = the drop down box that is in the dialog that comes up when you click on the delete option.
ConfigureToolStripMenuItem = Menu bar on the main form that is loaded when opening the program.
I am not sure how/what this needed to be converted to to have it remove from the drop down menu. If you need more info let me know.

