Results 1 to 2 of 2

Thread: Web Browser with Tabs and Bookmarks Help

  1. #1

    Thread Starter
    Junior Member Superluigi6's Avatar
    Join Date
    Apr 2012
    Location
    Planet Earth, or course!
    Posts
    18

    Question Web Browser with Tabs and Bookmarks Help

    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!

  2. #2
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: Web Browser with Tabs and Bookmarks Help

    I see no deletion from My.Settings anywhere in this code so how were you expecting any other result?
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width