Vyndrox
Member
***************a part of the source code*****************
Dim file As New System.IO.StreamWriter(filename)
For i = 0 To UBound(sFiles)
file.WriteLine(sFiles(i))
Next
file.Close()
ListBox1.Items.Clear()
ListBox1.Items.Add("The text file is written in the same directory as this executable, as " & filename)
btnSave.Enabled = False
btnShowFiles.Text = "Show Directory Files"
btnShowFiles.Focus()
ListBox1.Items.Add(Application.StartupPath & "\" & filename)
Catch ArgumentExep As System.ArgumentException
MsgBox(ArgumentExep.Message & vbLf & "Dont use illegal characters," & vbLf & "and wait 5 to 10 seconds to save to another file.")
Catch IOExep As System.IO.IOException
MsgBox(IOExep.Message & vbLf & "Wait 5 to 10 seconds and then save again, with another filename.")
End Try
I need the program to writes all the lines in the listbox to the .txt and not only the result. Maybe one of u guys have a solution for it.
Dim file As New System.IO.StreamWriter(filename)
For i = 0 To UBound(sFiles)
file.WriteLine(sFiles(i))
Next
file.Close()
ListBox1.Items.Clear()
ListBox1.Items.Add("The text file is written in the same directory as this executable, as " & filename)
btnSave.Enabled = False
btnShowFiles.Text = "Show Directory Files"
btnShowFiles.Focus()
ListBox1.Items.Add(Application.StartupPath & "\" & filename)
Catch ArgumentExep As System.ArgumentException
MsgBox(ArgumentExep.Message & vbLf & "Dont use illegal characters," & vbLf & "and wait 5 to 10 seconds to save to another file.")
Catch IOExep As System.IO.IOException
MsgBox(IOExep.Message & vbLf & "Wait 5 to 10 seconds and then save again, with another filename.")
End Try
I need the program to writes all the lines in the listbox to the .txt and not only the result. Maybe one of u guys have a solution for it.