我有2个窗口表格,一个是父母,另一个是儿童。 父母是主要形式。 孩子们是一位方言,使用者可以 where弄他们的细节。
如果在母体表格上点击,则装上儿童表格。 与此类似:
private void add_account_Click(object sender, EventArgs e)
{
this.account_add_edit = new Form2();
account_add_edit.test();
account_add_edit.ShowDialog();
}
As you can see I ve created a new form, tried to call a function from the new form, and then showed the form. The problem is the method from the form is not being called. I am getting an error on the IDE that says Windows.Forms.Form does not contain a method test.
I ve created the method in the child form:
public static string test(string val)
{
this.username = val;
}
任何关于我做什么错误的想法?