title: How to pass a form, object or data to a second form
body: <p>I have created 2 forms.
  The first one is the button that you want to back up.
  In the second there are paths that can be modified.
  How to make a reference that after pressing the "backup" button will get a path of 2 forms.
  The path is saved when I closed form2
  I know how to do it in one form but unfortunately I can not refer to another form.</p>
  
  <p>Source of Form 2:</p>
  
  <pre><code>Private Sub Browser_from1_Click(sender As Object, e As EventArgs) Handles Browser_from1.Click
          Dim FolderBrowserDialog1 As New FolderBrowserDialog
          FolderBrowserDialog1.ShowDialog()
          TextBox1from.Text = FolderBrowserDialog1.SelectedPath
  
          If Browser_from1.Text &lt;&gt; "" And TextBox1from.Text &lt;&gt; "" Then
              Backup.StartCopy.Enabled = True
  
          End If
  
      End Sub
  
      Private Sub Browser_to1_Click(sender As Object, e As EventArgs) Handles Browser_to1.Click
          Dim FolderBrowserDialog1 As New FolderBrowserDialog
          FolderBrowserDialog1.ShowDialog()
          TextBox2to.Text = FolderBrowserDialog1.SelectedPath
  
          If Browser_to1.Text &lt;&gt; "" And TextBox2to.Text &lt;&gt; "" Then
              Backup.StartCopy.Enabled = True
  
          End If
      End Sub
  
      Private Sub TextBox1from_TextChanged(sender As Object, e As EventArgs) Handles TextBox1from.TextChanged
  
      End Sub
  
      Private Sub save_settings_Click(sender As Object, e As EventArgs) Handles save_settings.Click
          My.Settings.pathmem = TextBox2to.Text
          My.Settings.pathmem1 = TextBox1from.Text
          My.Settings.Save()
      End Sub
  
      Private Sub setting_Load(sender As Object, e As EventArgs) Handles MyBase.Load
          TextBox1from.Text = My.Settings.pathmem1
          TextBox2to.Text = My.Settings.pathmem
      End Sub
  End Class
  </code></pre>