实现你的问题,我的思路是将FormMain传给子窗体,ListBox的设为public:
private FormMain _frm;
public frmChild(FormMain frm)
{
_frm=frm;
frm.ListBox1.Add(this.Text);
}
private void frmTest_Closed(object sender, System.EventArgs e)
{
_frm.ListBox1.Remove(this.Text)
}
private FormMain _frm;
public frmChild(FormMain frm)
{
_frm=frm;
frm.ListBox1.Add(this.Text);
}
private void frmTest_Closed(object sender, System.EventArgs e)
{
_frm.ListBox1.Remove(this.Text)
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货