开发者

How to update UI when invoke method failed

开发者 https://www.devze.com 2023-01-28 10:09 出处:网络
set visible = true then message box show it is false delegate void LoadLastDeptSettingDelegate(String last_dept);

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

精彩评论

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

关注公众号