Quote Originally Posted by .paul. View Post
try this:

vb Code:
  1. Public Class Form1
  2.  
  3.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  4.         'save
  5.         Dim sfd As New SaveFileDialog
  6.         If sfd.ShowDialog = Windows.Forms.DialogResult.OK Then
  7.             IO.File.WriteAllLines(sfd.FileName, New String() {TextBox1.Text, TextBox2.Text, Label3.Text})
  8.         End If
  9.     End Sub
  10.  
  11.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  12.         'load
  13.         Dim ofd As New OpenFileDialog
  14.         If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then
  15.             Dim lines() As String = IO.File.ReadAllLines(ofd.FileName)
  16.             If lines.Count = 3 Then
  17.                 TextBox1.Text = lines(0)
  18.                 TextBox2.Text = lines(1)
  19.                 Label3.Text = lines(2)
  20.             End If
  21.         End If
  22.     End Sub
  23.  
  24. End Class
Any way to get that to look for a folder and only at .txt like with Dialogs -> OpenFileDialog and SaveFileDialog?