Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim fw As New StreamWriter("C:\charles.txt")
fw.WriteLine("Happy New Year 2011")
fw.Close()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim fr As New StreamReader("C:\charles.txt")
MsgBox(fr.ReadLine())
End Sub
End Class