变量被调用的窗体Form1:
private void buttonX8_Click(object sender, EventArgs e)
{
MessageUpdate f = new MessageUpdate(a2, b2, c2, d2, E2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2);//a2............r2是该窗体中已赋值的变量
f.Show();
}
调用变量的窗体Form2:
public Form2(string a3, string b3, string c3, string d3, string e3, string f3, string g3, string h3, string i3, string j3, string k3, string l3, string m3, string n3, string o3, string p3, string q3, string r3)
{
InitializeComponent();
textBoxX1.Text = a3;
comboBox1.Text = b3;
textBoxX3.Text = c3;
textBoxX4.Text = d3;
textBoxX5.Text = e3;
comboBox2.Text = f3;
comboBox3.Text = g3;
comboBox4.Text = h3;
comboBox5.Text = i3;
textBoxX10.Text = j3;
textBoxX11.Text = k3;
textBoxX12.Text = l3;
textBoxX13.Text = m3;
textBoxX14.Text = n3;
textBoxX15.Text = o3;
textBoxX2.Text = p3;
textBoxX6.Text = q3;
dateTimePicker1.Text = r3;
}