S
Soren-a
Hi all
I am working on a C#.NET CF program, and I have run into a problem.
I have two forms. One form called "Structs" and on called "DInfo".
Every 10 seconds I use a timer to call two funktions in the "Structs"
form, which create a structure called "DI_Record" containing a number
of strings.
I then use another timer on the "DInfo" form to call a funktion that
has to display data from the "DI_Record" structure on labes/textbox's
on the "DInfo" GUI. I make the call to change the text in the
labes/textbox's like this:
public void ChangeText()
{
string ChangedText = Structs.DI_Record[0].Adresse;
TextLabel.Text = ChangedText; //a public Label
textBox1.Text = ChangedText; //a public textBox
}
What happens is that the "DI_Record" is made correctly and the call
"string ChangedText = Structs.DI_Record[0].Adresse" is also succesfull
(ChangedText get the correct value). The two call's to set the text of
the label and the textBox are also succesfull (no errors).
My problem is that noting happens on the screen! The text of the label
and textBox does not change. I have tried to use
"TextLabel.Invalidate()", "TextLabel.Refresh()", "TextLabel.Update()"
after I set the text, but that does not help.
Does anyone know how to solve this problem??
Any help is much appriciated!
Regards
Søren Augustesen
I am working on a C#.NET CF program, and I have run into a problem.
I have two forms. One form called "Structs" and on called "DInfo".
Every 10 seconds I use a timer to call two funktions in the "Structs"
form, which create a structure called "DI_Record" containing a number
of strings.
I then use another timer on the "DInfo" form to call a funktion that
has to display data from the "DI_Record" structure on labes/textbox's
on the "DInfo" GUI. I make the call to change the text in the
labes/textbox's like this:
public void ChangeText()
{
string ChangedText = Structs.DI_Record[0].Adresse;
TextLabel.Text = ChangedText; //a public Label
textBox1.Text = ChangedText; //a public textBox
}
What happens is that the "DI_Record" is made correctly and the call
"string ChangedText = Structs.DI_Record[0].Adresse" is also succesfull
(ChangedText get the correct value). The two call's to set the text of
the label and the textBox are also succesfull (no errors).
My problem is that noting happens on the screen! The text of the label
and textBox does not change. I have tried to use
"TextLabel.Invalidate()", "TextLabel.Refresh()", "TextLabel.Update()"
after I set the text, but that does not help.
Does anyone know how to solve this problem??
Any help is much appriciated!
Regards
Søren Augustesen