I created a new Windows Form Project in Visual Studio. In this project, I create a new Class to put all my code in it.
In my Form1.cs, I call my Class like this:
MyNewClass mnc = new MyNewClass();
In my button code, I put something like this:
mnc.MyMethods();
In my class, I call my form like this:
Form1 form1 = new Form1();
In my methods, I made this code:
form1.MyTextBox.Text = "Salut toi";
form1.Refresh();
But nothing appears in my form.
Form1 form1 = new Form1();This is most likely not the form you see on the screen. It's "new", and not "shown".