So I have the template C# windows form, and made the debugInstructionsLabel
label public so that I can edit it from outside the form, then added a few lines to main:
namespace test {
static class Program {
[STAThread]
static void Main() {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Form1 form = new Form1();
Application.Run(form);
form.debugInstructionsLabel.Text += "Aaaaaaa";
form.Refresh();
form.Update();
form.Invalidate();
Application.DoEvents();
}
}
}
However, this doesn't actually change anything in the form, how would I update the text?
EDIT: It seems like Application.Run
doesn't return, should I create another thread or handle everything inside the form class?