这个问题可能已经回答了,我可能在 google 中输入了错误的问题,但我想运行time_refresh
form1 上的函数,并且在 form2 上运行良好。这是我到目前为止得到的:
表格1
public void time_refresh()
{
run_stop.Text = Properties.Settings.Default.s_update + " " + Properties.Settings.Default.s_update_int;
run_stop.ForeColor = Color.Green;
}
表格2
private Main_form_1 form1 = null;
和
form1.time_refresh();
但它得到一个错误
你调用的对象是空的。对 c# 来说有点新,所以任何帮助都会非常好。