我正在尝试对menustrip启用= false ..但代码正在执行,但无法禁用菜单
MenuStrip ms = (MenuStrip)frm_MDI.objMdi.Controls["msMainMenu"];
foreach (ToolStripMenuItem tmm in ms.Items)
{
tmm.Enabled = false;
}
答案 0 :(得分:0)
添加objMdi = this后;在加载事件。它工作正常。
private void frm_MDI_Load_1(object sender, EventArgs e)
{
objMdi = this;
}