D
DAXU
Hello,
Suppose I have a windows form running in culture A, then the form
creates a new thread (call a method foo for example) and makes it
using culture B.
When method foo is running in the new thread, it may try to change a
label in the form. So code is like:
foo()
{
string message = resMan.GetString("strLabel");
if (label2.InvokeRequired)
label2.Invoke(new MethodInvoker(foo));
else
label2.Text = message;
}
The problem is that it will never show the label as culture B as foo
finally goes to the thread the windows form is running (culture A).
So what is the best way to handle it?
The real code was written without consideration of localizaton but now
requirement is added to support multi cultures.
Many Thanks
Jerry
Suppose I have a windows form running in culture A, then the form
creates a new thread (call a method foo for example) and makes it
using culture B.
When method foo is running in the new thread, it may try to change a
label in the form. So code is like:
foo()
{
string message = resMan.GetString("strLabel");
if (label2.InvokeRequired)
label2.Invoke(new MethodInvoker(foo));
else
label2.Text = message;
}
The problem is that it will never show the label as culture B as foo
finally goes to the thread the windows form is running (culture A).
So what is the best way to handle it?
The real code was written without consideration of localizaton but now
requirement is added to support multi cultures.
Many Thanks
Jerry