在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
Form2 public partial class Form2 : Form { public string str; public Form2() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { str = textBox1.Text; Form3 f3 = new Form3(); f3.ShowDialog(this); } } Form3 public partial class Form3 : Form { public Form3() { InitializeComponent(); } private void Form3_Load(object sender, EventArgs e) { Form2 f2 = (Form2)this.Owner; MessageBox.Show(f2.str); } }
或者直接把Form1中的textBox的属性设为Public |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论