this.textBox1.Text = f2.returnValue;
}
Form1 中 (父窗口:)
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button btnOpen;
public System.Windows.Forms.TextBox txtContent; //注意是public ........
........
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void btnOpen_Click(object sender, System.EventArgs e) {
Form2 frm=new Form2(this);
frm.ShowDialog();
}
}
Form2中(子窗口)
public class Form2 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox txtValue;
private Form _parentForm=null;
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库C窗体间传值的几种方法(7)在线全文阅读。
相关推荐: