我在FORM1中如何给FORM2的控件赋值?
private void btOK_Click(object sender, EventArgs e)
{
//打开另一个FORM
FrmPurInScan frmPurInScan = new FrmPurInScan();
frmPurInScan.ShowDialog();
//要把数据传到frmPurInScan里面的控件
}
------解决方案--------------------http://www.cnblogs.com/icesnaker/archive/2004/08/28/37279.html
------解决方案--------------------在FrmPurInScan里面写一个方法:
public void setData(string data)
{
.....
}
//打开另一个FORM
FrmPurInScan frmPurInScan = new FrmPurInScan();
frmPurInScan.setData( "xxxx ");
frmPurInScan.ShowDialog();