Private Sub ReadFile(ByRef file_path As String) Dim sr As New System.IO.StreamReader(file_path, System.Text.Encoding.GetEncoding(932)) '内容を一行ずつ読み込む While sr.Peek() > -1 MessageBox.Show(sr.ReadLine()) End While '閉じる sr.Close() End Sub
Private Sub WriteFile(ByRef file_path As String) Dim sw As New System.IO.StreamWriter(file_path, False, System.Text.Encoding.GetEncoding(932)) '書込む sw.Write("書込む内容") '閉じる sw.Close() End Sub