开发者

How to update UI when invoke method failed

set visible = true then message box show it is false

 delegate void LoadLastDeptSettingDelegate(String last_dept);
        private void LoadLastDeptSetting(String last_dept)
        {
            //MessageBox.Show("last dept " + last_dept + this.InvokeRequired.ToString());
            if (this.InvokeRequired)
            {
                //this.BeginInvoke(new MethodInvoker(delegate() { LoadLastDeptSetting(last_dept); }));
                this.Invoke(new LoadLastDeptSettingDelegate(this.LoadLastDeptSetting), new
                object[] { last_dept });
            }
            开发者_C百科else
            {
                  grpPeriod.Visible = true;
                  MessageBox.Show("before 3 " + this.grpPeriod.Visible.ToString());


The Visible property indicates the control's actual visibility.

If one of the control's ancestors, or the entire form, is not visible, it will always return false.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜