I have a text box with some text in it ("hello"). If I change the text to something else and get the text from the text field (through the code), I will get a "hello", although I changed it.
In another case, when I change the check state of a flag, the flag will not be visually checked (or disabled).
Does anyone have an idea what is happening and how to synchronize them?
I opened a new project, this is the only function in my form:
public void Switch()
{
Checkbox1.Checked = !Checkbox1.Checked;
}
and I call it from program.cs:
static MainForm MyForm;
MyForm = new MainForm();
MyForm.Switch();
source
share