I have a tab control in a which a few of the tabs include an AxWebBrowser browser control. Let say i have currently tabpage2 and i typed url in combobox when i pressed enter it doesn't display webbrowser instead i can do create new tab. ne one knows how to display currrently displayed regardless of tabpage(s)?
here is code:
Public Sub AddBrowserTab()
AxWebBrowser1.Visible = False
Dim newPage As TabPage = New TabPage(Text) ' Delcare and create the tab page
Dim browser As AxSHDocVw.AxWebBrowser = New AxSHDocVw.AxWebBrowser ' Declare and create the browser(control)
newPage = New TabPage(Text)
browser = New AxSHDocVw.AxWebBrowser
newPage.Controls.Add(browser) ' Add the browser to the tab(page)
browser.Dock = DockStyle.Fill ' Fill the tab page withit.
browser.Enabled = True ' Enable it
TabControl1.TabPages.Add(newPage) ' Add the tab page to the tab control
TabControl1.Visible = True
browser.Navigate2(cboAddress.Text)
browser.Silent = False
newPage.ToolTipText = Text
Debug.WriteLine("NP :" & newPage.TabIndex)
Debug.WriteLine("Name :" & newPage.Text.ToString())
' browser.Navigate2("about:blank") ' Set initial page to blank()
cboAddress.Text = String.Empty
End Sub