How can I disable mdi form menu item except one menu item?
How can I disable all the menu item in mdi form except only one menu item. In that menu item I can click and open a login form after I enter the username and password I will click the login button. Here I can open the mdi form with all menu items are enabled . How can I do this in my project . Please help me ... Here am I using c# windows application.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Raja TRank #685 · 3.5K reputationPosted Sep 8, 2015, 5:51 AM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 8, 2015, 5:53 AM EDT
MdiParent.Menu.Enabled=fal
or if needed you will have to loop through all the menu items to delete them one by one:
foreach (MenuIiem mnu in MdiParent.Menu.MenuItems)
{
mnu.Enabled=false;
}