0

Hello,

I have a problem. I'm working on this advanced web browser with my friend, and we made a favorites feature. So, it works and all that, but, after I close the executable file, it doesn't save anything!

Ex:

Starting Up, adding Google as new favorites, then closing the browser.
Starting up again, 1 hour later, but there's no Google!

Here's what I put for saving the favorites (please do not steal the code!)

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    If Not TextBox2.Text = "Not Valid" Then
        Dim g As New ToolStripMenuItem
        g.Text = TextBox2.Text
        AddHandler g.Click, AddressOf BookmarkClick
        My.Settings.Boookmarks.Add(TextBox2.Text)
        Form1.BookmarksToolStripMenuItem.DropDownItems.Add(g)
    Else
        MsgBox("Please enter a valid URL!", MsgBoxStyle.Exclamation, "Error")
    End If
End Sub

Then, how do I save the thing so when I load up the file it actually still has the favorites on there? I need help, and if you have any questions, I'd be happy to answer them! Thank you so much,

VBrulez

Edited by Narue: Cleaned up code a bit for easier reading/copying.

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by Luc001
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.