与此主题相关:
我需要将我在DtextEditoR (form) 中的标签中的文本调用到frmMain (form) 中的另一个标签。我使用计时器而不是按钮,因为我在这里遵循答案: Communicate between two windows forms in C#
这导致:
frmMain.cs:
private DtexteditoR a;
public frmMain(Form callingForm)
{
a = callingForm as DtexteditoR;
InitializeComponent();
}
private void timercountline_Tick(object sender, EventArgs e)
{
a.lblcl = lblcountline.Text;
}
文本编辑器R.cs
public string lblcl //rich
{
get { return lblcountline.Text; }
set { lblcountline.Text = value; }
}
但问题是这个错误总是显示:
我应该怎么做才能消除该错误?请帮助非常感谢!