title: how to change the background image of a form using open file dialog on another form
body: <p>I have a query that. I have a splash form that is my first form of the project and I want to change the background image of that form after that is closed. For example my software starts and after splash form and in setting I have a function to change the background image of the splash form. Can I change the background image when the form is closed? (as my splash form is closed when user enters the setting form).</p>
  
  <p>I have written this code form changing the background image but I don't know how to change the form image when the splash form opens it should open changing the image from the open file dialog.</p>
  
  <p>My code is:</p>
  
  <pre><code>var FD = new System.Windows.Forms.OpenFileDialog();
              FD.Filter = "jpeg files|*.jpg";
              if (FD.ShowDialog() == System.Windows.Forms.DialogResult.OK)
              {
                  string fileToOpen = FD.FileName;
  
                  System.IO.FileInfo File = new System.IO.FileInfo(FD.FileName);
                  BackgroundImage = Image.FromFile(FD.FileName); 
              }
  </code></pre>