0

Given a Windows Form with manual set Current(UI)Culture "EN-GB". When I open another form out of this by

using( FormB form = new FormB() )
{
    form.ShowDialog( this );
}

the FormB has set the Current(UI)Culture of the operating system.

Is this the default behavior (before .NET 4.5) and I have to set the culture of every form manually? (I know .NET 4.5 has DefaultThread(UI)Culture)

Thank you in advance.

Powerslave
  • 531
  • 2
  • 7
  • 24
  • 1
    Nope. If you set `Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB")` in the calling Form, the new Form will have the same culture. The thread it's the same (main UI Thread). Set also `Thread.CurrentThread.CurrentUICulture`. – Jimi Jul 02 '19 at 08:30
  • See also [this question](https://stackoverflow.com/a/56453654/7444103) about [GetProcessPreferredUILanguages](https://learn.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-getprocesspreferreduilanguages), [SetProcessPreferredUILanguages](https://learn.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-setprocesspreferreduilanguages). Related: `Get/SetThreadPreferredUILanguages` and `Get/SetSystemPreferredUILanguage` – Jimi Jul 02 '19 at 08:44

0 Answers0