Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42215

VS 2010 Web Browser with Tabs and Bookmarks Help

$
0
0
Hey there,

I made an advanced web browser with tabs and bookmarks. But when I try to delete my bookmarks, it will not delete it after you close the program and open it again. I made the program with Visual Basic 2010.

Please help me someone who could fix this? Below is the Bookmarks program code:

Code:

Public Class Bookmarks
    Dim SW As IO.StreamWriter
    Dim Favorites As String = "C:\app.favorites.dat"

    Private Sub Bookmarks_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Form1.Load_Favorites()
    End Sub

    Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
        ListBox1.Items.RemoveAt(ListBox1.SelectedIndex)
    End Sub

    Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.Click
        ListBox1.Items.Clear()
    End Sub

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        My.Settings.Bookmarks.Add(TextBox1.Text)
        ListBox1.Items.Add(TextBox1.Text)
        SW = System.IO.File.AppendText(Favorites)
        SW.WriteLine(TextBox1.Text)
        SW.Flush()
        SW.Close()
    End Sub

    Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
        My.Settings.Save()
    End Sub

    Private Sub Button5_Click(sender As System.Object, e As System.EventArgs) Handles Button5.Click
        End
    End Sub
End Class

If you want me to include the entire code then please tell me. If you know how to fix it, then THANK YOU!

Viewing all articles
Browse latest Browse all 42215

Trending Articles



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