I am making a simple tabbed browser in vb (2005) and I have the code below to add a new Tab and browse to a website, but what i am having trouble with is the navigation, so "Back", "Forward" etc. I can't seem to find the right code to navigate on the current Tab.
Dim tb As New Form Dim wb As New WebBrowser TabControl1.TabPages.Add(tb) wb.Dock = DockStyle.Fill wb.Navigate("about:blank") tb.Controls.Add(wb)
I have seen code on the net like the below which builds successfully, but then fails:
System.ArgumentOutOfRangeException was unhandled
{"Index 0 is out of range.Parameter name: index"}
CType(TabControl1.TabPages.SelectedTab.Controls.Item(0), WebBrowser).GoBack()
I am sure I am missing something obvious, but hope someone can help?