It is assumed that you have already placed these 2 controls on your winform:
1: TextBox (txt_data)
2: Button (btn_save)
Now create an on_click method for btn_save
'//////////////////////////////////////////////////////////////
Private
Sub btn_save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_save.Click'Create a text file, and save contents of the textbox (txt_data.text) into the file
Dim output As FileStream
Dim filechooser As New SaveFileDialog()
Dim result As DialogResult = filechooser.ShowDialog
Dim filename As String
filechooser.CheckFileExists = False
If result = DialogResult.Cancel Then
Exit Sub
End If
filename = filechooser.FileName
output = New FileStream(filename, FileMode.Create, FileAccess.Write)
Dim data As [Byte]() = Encoding.ASCII.GetBytes(txt_data.Text)
output.Write(data, 0, data.Length)
output.Flush()
output = Nothing
End Sub
'//////////////////////////////////////////////////////////////