I am allowing user to change some settings (language - UI culture) and to show current form in new language, I need to close form and reopen it.
I am using Windows Forms. In Program.cs first I show Splash screen and then Login form and after this I run Main form with
Application.Run(new frmMain());.
I tried several solutions offered which includes:
Controls.Clear();
InitializeComponent();
also I tried
var form = new frmMain();
form.Show();
this.Hide();
and also
this.Close();// note I tried before and after.
var form = new frmMain();
form.Show();
I also tried in form closing event
Application.Run(new frmMain());
and one solution with opening new thread.
None of this worked, or it worked partially, had some issues like not closing program well, or some other. Is there some new simple way to do this that works?
or I better show user dialog box message "Do you want to restart program to show new language?"
Thanks