Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
SaveFileDialog1.Filter = " .txt (*.*)|*.*"
If SaveFileDialog1.ShowDialog = DialogResult.OK Then
TextBox1.Text = SaveFileDialog1.FileName.TrimStart
end if
End Sub
Dim objWriter As StreamWriter
Dim FullPath As String = Application.StartupPath & "\chatlog" & Date.Now.ToString() & ".txt"
Try
objWriter = New StreamWriter(FullPath)
objWriter.Write(TextBox1.Text)
objWriter.Close()
Catch Ex As Exception
MessageBox.Show(Ex.Message)
End Try