title: Reload a Windows Form from another Form with VB .NET 4+
body: <p>Using Visual Studio 2010, WinForms, and VB.Net, I am trying to use one form as a "User Settings" page (Form2) that contains a "Theme" variable for Form1. Basically after a user enters a different theme name (which will eventually be a dropdown list) into the user settings and clicks the save button, I want Form1 to be redrawn or reloaded with the new theme settings.</p>
  
  <p>I have tried to use refresh, hide/show Form1, recall the form_load event, and many other things. I have looked online for a method to redraw or unload/reload the form1 with the new theme setting, but I haven't found anything that works and will change the color settings of form1 once the user saves the user settings on form2.</p>
  
  <p>According to the logic and the documents I have read, one of these options should work, but none of them change the background color of the form1. I have tried calling the ColorChange on load event, on shown event, etc.</p>
  
  <p>I don't want to use the Color Dialog because I don't want the user to select individual colors. I want them to choose from a selection of pre-designed themes that are saved in the user settings. This is only a test project so you can let me know the good and bad about doing it this way while suggesting other ways to do it, but I would much rather understand the reason that none of these options work and figure out a way to make it work if it is possible.</p>
  
  <h3>Form1</h3>
  
  <pre><code>Dim selectedTheme As String = My.Settings.Theme
  
  Sub ColorChange()
      Select Case selectedTheme
          Case "Desert"
              Me.BackColor = Color.Brown
          Case "Default"
              Me.BackColor = Color.Black
              lblErrorMsgs.ForeColor = Color.Red
      End Select
  
  End Sub
  </code></pre>
  
  <h3>Form2</h3>
  
  <pre><code>Private Sub btnSaveSettings_Click(sender As Object, e As EventArgs) Handles btnSaveSettings.Click
      My.Settings.Theme = txtTheme.Text
      My.Settings.Save()
  
      Form1.Refresh()
      Form1.Show()
  
      Me.Hide()
  
  End Sub
  </code></pre>