'เขียนไฟล์
Dim fs As New FileStream("D:\path.ini", FileMode.Create, FileAccess.Write)
Dim s As New StreamWriter(fs, System.Text.Encoding.Default)
s.BaseStream.Seek(0, SeekOrigin.End)
s.WriteLine(txt_path.Text)
s.Close()
'อ่านไฟล์
Dim fileName As String = "D:\path.ini"
Dim objReader As StreamReader
Dim LineOfText As String
Dim arrayTextFile() As String
objReader = New StreamReader(fileName)
LineOfText = objReader.ReadLine
arrayTextFile = LineOfText.Split
txt_path.Text = arrayTextFile(0)