The value between the two forms is selected from the BLOG of Add8849.

xiaoxiao2021-03-06  50

Form1 placed a label1, a button1, form1 is the main window, when you click Button1, execute: form2 f2 = new form2 (); f2.showdialog (this); Form2 is placed in a TextBox1, a Button1, execute when clicking Button1 : Form1 f1 = (form1) this.owner; f1.label1.text = this.textBox1.text; Note: Label1 in Form1 is set to public

转载请注明原文地址:https://www.9cbs.com/read-115621.html

New Post(0)