public void WdEnable(bool flg) { if (this.InvokeRequired) { WdEnableCallback d = new WdEnableCallback(WdEnable); this.Invoke(d, new object[] { flg }); } else { this.Enabled = flg; } }
public void WdEnable(bool flg) { System.Windows.Forms.ToolStrip toolStrip = this.GetCurrentParent(); if (toolStrip.InvokeRequired) { WdEnableCallback d = new WdEnableCallback(WdEnable); toolStrip.Invoke(d, new object[] { flg }); } else { this.Enabled = flg; } }