Hi, sorry for my stupid question about windows form application again:
There are two *.cs files in one solution, one is where the main form and one button and public textbox initialized and created. The other one is where a function used to change the textbox.text on the main form.
In the 2nd *.cs file:
private Form1 form = new Form1()
public void test()
form.textbox.Text = "this is from another class";
in the Form1.cs, I created an instance of 2nd*.cs and called the function by button click event, but the textbox.text wasn't changed at all, what shall I do then?
This is a design error in the first place. No member variable should ever be public. The function you created in the second file should have been a public member function of your form class which operates on this forms private textbox. You can then call this method on your created form object.