How can I reload my main form after changing UICulture without losing my controls state

208 Views Asked by At

I'm doing a program that controls motors and the user can change the language of the application. I need to reload my form to update some labels and buttons names, but all states are lost. How can I reload it without losing my controls states?

I have this code:

Thread.CurrentThread.CurrentUICulture = New CultureInfo("fr-FR")
Me.Controls.Clear() 'removes all the controls on the form
initialize_component() 'load all the controls again
Main_Form_Load(e, e)

Doing this I lose the state.

0

There are 0 best solutions below