|
-
Jan 5th, 2013, 10:11 PM
#1
Thread Starter
Junior Member
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!
-
Jan 6th, 2013, 12:12 PM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|