我是 C# 的初学者。每当用户单击按钮和(这些按钮位于)时,我想从其他表单中编辑lblText
表单中存在的标签。subForm
mainForm
btnHigh
btnLow
mainForm
For btnHigh_Click event --> lblText should have text "high"
For btnLow_Click event --> lblText should have text "low"
我尝试了以下代码:(不工作)
btnHigh_Click 事件
subForm sf = new subForm ();
sf.ShowDialog();
sf.lblText.Text = "High"; // lblText --> modifier is public
我在这里做错了什么?
请帮助
提前致谢。