Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27196

VS 2010 I need help with my account saver program.

$
0
0
I am making a program which will save accounts that you input. This is useful for if you have a bunch of accounts for lots of websites or games and you are a forgetful person.

This is what the program GUI looks like.
Name:  Untitled.png
Views: 36
Size:  14.6 KB

This is the code that this program uses.
Code:

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        My.Settings.Accounts.Add(TextBox1.Text & " | " & TextBox2.Text & " | " & TextBox3.Text)
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        MessageBox.Show("The accounts will be saved once you close the program. If you want to check your accounts again, just open the program back up. - Owen Penner")
    End Sub

    Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
        My.Settings.Accounts = New Specialized.StringCollection()
    End Sub
End Class

Once you input an account I would like it to go into the listbox like so.
Code:

Username: Flavor
Password: Flav
Use: vbforums.com

Flavor | Flav | vbforums.com

I know how to make it do that, but I would also like it to save in the listbox once I close the program.

As of now, whenever I try adding an account into the listbox it gives me this error.
Name:  Untitled2.png
Views: 38
Size:  28.7 KB

This is what my settings look like.
Name:  Untitled3.png
Views: 27
Size:  15.2 KB



If I didn't explain well enough what I need help with, please let me know and I will elaborate more.
Attached Images
   

Viewing all articles
Browse latest Browse all 27196

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>