Winform 控制另一窗体控件文本显示

foreach (Form frm in Application.OpenForms)
            {
               
if (frm is Form2)
                {
                    frm.Controls[
" label1 " ].Text = " 要赋的值 " ;
                   
break ;
                }
            }

Form f =new this.FindForm() as NewForm   // 要控制的窗体
 
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页