Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- ListBox1.Items.Add("Username: " & TextBox1.Text)
- ListBox1.Items.Add("Password: " & TextBox2.Text)
- End Sub
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- Dim Saveval As Integer = 1
- Dim Listpath As String = "C:\List Data Collection_" & Saveval & ".txt"
- Saveval = Saveval + 1
- For i = 0 To ListBox1.Items.Count - 1
- ListBox1.SetSelected(i, True)
- Dim Listwrite As System.IO.StreamWriter
- Listwrite = My.Computer.FileSystem. _
- OpenTextFileWriter(Listpath, True)
- Listwrite.WriteLine(ListBox1.Items(i))
- Listwrite.Close()
- Next
- End Sub
- Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
- ListBox1.Items.Clear()
- End Sub
- End Class
Add Comment
Please, Sign In to add comment