CodePudding user response:
namespace WindowsFormsApp1
{
Public partial class Form2: Form
{
Public Form2 ()
{
InitializeComponent();
}
Public void SetLabel (string value)
{
This. Label1. Text=value;
}
}
}
namespace WindowsFormsApp1
{
Public partial class Form1: Form
{
Form2 form;
Public _click ()
{
InitializeComponent();
}
Private void Form1_Load (object sender, EventArgs e)
{
Form=new Form2 ();
Form. The Show ();
}
Private void button1_Click (object sender, EventArgs e)
{
Form. SetLabel (" 123321 ");
}
}
}
CodePudding user response:
You have to write this method much more label, a little bit of a problemCodePudding user response:
Can set the label into publicThrow it to the delegate can also
Write a way out and into
Get a reflex can also
Have a proxy access also OK
Get into messaging also into
According to the way you ask questions, it is recommended that the former three, at the back of the three kinds of understanding the later
CodePudding user response:
http://bbs.csdn.net/topics/390128592CodePudding user response:
Is changed to another Form to control value?Form2 f2=new Form2 (" value ");
Write a constructor Form2 inside Public Form2 (string value) {label. The text=value};
This also line
CodePudding user response:
The