using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace FormToValue{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } public string Form1Text { get { return this.textBox1.Text; } set { this.textBox1.Text = value; } } private void button1_Click(object sender, EventArgs e) { Form2 f2 = new Form2(); f2.Owner = this; f2.Show(); } }}
评论