Ettiggi
26-11-2009, 17:53
Hello!..(sto per sclerare):doh:
Sto mettendo su un browser web con visual basic 2008, a tempo perso, non riesco a modificare questo codice, in modo che possa essere adattato per un Web Browser con Schede e non con un unica scheda (le Tab) ..[tabcontrol1] è il nome del controllo a schede mentre [webbrowser1] è quello per la scheda unica già presente in quel codice
Public Class bookmarks
Private Sub bookmarks_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
tt.Hide()
TextBox1.Text = Form1.WebBrowser1.Url.AbsoluteUri
tt.Text = My.Settings.bookmarks
For Each blabla As String In tt.Lines
ListBox1.Items.Add(blabla)
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ListBox1.Items.Add(TextBox1.Text)
My.Settings.bookmarks = My.Settings.bookmarks + ControlChars.NewLine + TextBox1.Text
My.Settings.Save()
End Sub
Private Sub t1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
Form1.WebBrowser1.Navigate(ListBox1.SelectedItem)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form1.WebBrowser1.Stop()
ListBox1.Items.RemoveAt(ListBox1.SelectedIndex)
My.Settings.bookmarks = ""
For Each remove As String In ListBox1.Items
My.Settings.bookmarks = remove
Next
My.Settings.Save()
End Sub
Private Sub ListBox1_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDoubleClick
Form1.WebBrowser1.Navigate(ListBox1.SelectedItem)
End Sub
End Class
Sto mettendo su un browser web con visual basic 2008, a tempo perso, non riesco a modificare questo codice, in modo che possa essere adattato per un Web Browser con Schede e non con un unica scheda (le Tab) ..[tabcontrol1] è il nome del controllo a schede mentre [webbrowser1] è quello per la scheda unica già presente in quel codice
Public Class bookmarks
Private Sub bookmarks_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
tt.Hide()
TextBox1.Text = Form1.WebBrowser1.Url.AbsoluteUri
tt.Text = My.Settings.bookmarks
For Each blabla As String In tt.Lines
ListBox1.Items.Add(blabla)
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ListBox1.Items.Add(TextBox1.Text)
My.Settings.bookmarks = My.Settings.bookmarks + ControlChars.NewLine + TextBox1.Text
My.Settings.Save()
End Sub
Private Sub t1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
Form1.WebBrowser1.Navigate(ListBox1.SelectedItem)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form1.WebBrowser1.Stop()
ListBox1.Items.RemoveAt(ListBox1.SelectedIndex)
My.Settings.bookmarks = ""
For Each remove As String In ListBox1.Items
My.Settings.bookmarks = remove
Next
My.Settings.Save()
End Sub
Private Sub ListBox1_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDoubleClick
Form1.WebBrowser1.Navigate(ListBox1.SelectedItem)
End Sub
End Class