//form1:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form2 f2 = new Form2(textBox1.Text);
f2.Show();
}
}
//form2:
public partial class Form2 : Form
{
public Form2(string value)
{
InitializeComponent();
label2.Text = value;
}
}
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form2 f2 = new Form2(textBox1.Text);
f2.Show();
}
}
//form2:
public partial class Form2 : Form
{
public Form2(string value)
{
InitializeComponent();
label2.Text = value;
}
}
No comments:
Post a Comment