Why doesn't setting CurrentUICulture use new culture

  • Thread starter Thread starter TS
  • Start date Start date
T

TS

I have seen from the samples that you set the CurrentUICulture then you must
open up a new version of this form and hide the old one. Is there a way to
make it so the current form that is showing automatically updates to the new
culture. Doing this will require you to some how get any values that exist
on the original form, then move them to the newly spawned form.

Am I missing something?

thanks a bunch!
 
One approach is to move your main() function out into some other class
besides a Windows Form, and set the UICulture in main before you show the
first form in your application.

Tom Dacon
Dacon Software Consulting
 
Hi TS,
The resources for a form loaded by the ResourceManager are determined by
the UI culture setting. Generally, we set the thread's CurrentUICulture
property before we call the InitializeComponent of a form ( always in their
ctor).

In your case, you want to change the thread's UI culture after the form is
complete to initialize according to a UI culture. As you have seen, we have
to open up a new version of this form and hide the old one since it will
have the form re-initialized with the correct culture-specific resource.
Then for the data in the old form, we need save and restore them by
ourselves.


Thanks,
Rhett Gong [MSFT]
Microsoft Online Partner Support

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks.
 
Back
Top