WinForm跨窗体传值
1、另一窗体建公共变量listdataRow
public List<DataGridViewRow> listdataRow = new List<DataGridViewRow>(); FRM_TR_CurrencyQueryEx_View2_DLCR frmTrCurrencyQueryEx = new FRM_TR_CurrencyQueryEx_View2_DLCR(cbx_selectType.Text); frmTrCurrencyQueryEx.ShowDialog(); if (frmTrCurrencyQueryEx.DialogResult == System.Windows.Forms.DialogResult.OK) { listdataRow = frmTrCurrencyQueryEx.listdataRow; GetInfoManagerName(); }
2、通过构造函数
public Form2 ( int value1 , string value2 ) { InitializeComponent ( ); this.value1 = value1; this.value2 = value2; }
3、其它方法
参考如下博友
http://www.cnblogs.com/xiaofengfeng/p/3182056.html
所有问题都会有一定程度的抽象和假设