S
simchajoy2000
I have a menu bar that I initialize in Private Sub
InitializeComponent() and then later on in my code, depending on
different conditions, I need to be able to disable some of the menu
items programmatically. I am able to set the visibility for the menu
item to false and it works correctly but for some reason, it won't
work if I try to set the enabled property to false. Here is my code:
Dim m As MenuItem = mainMenuBar.MenuItems.Item(1)
Dim n As MenuItem = m.MenuItems.Item(2)
n.Visible = False
n.Enabled = False
Does anyone know what I am doing wrong or why this is not working??
Thanks!!
Joy
InitializeComponent() and then later on in my code, depending on
different conditions, I need to be able to disable some of the menu
items programmatically. I am able to set the visibility for the menu
item to false and it works correctly but for some reason, it won't
work if I try to set the enabled property to false. Here is my code:
Dim m As MenuItem = mainMenuBar.MenuItems.Item(1)
Dim n As MenuItem = m.MenuItems.Item(2)
n.Visible = False
n.Enabled = False
Does anyone know what I am doing wrong or why this is not working??
Thanks!!
Joy