linking a webbrowser to a textbox?

izzyq8

Member
Joined
Dec 29, 2007
Messages
21
Programming Experience
Beginner
hey everybody
just a simple question hopefully its been boggling my mind all night
im creating a web browser using vb.net and i managed to add tabs by a simple button click

VB.NET:
  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim myTabPage As New TabPage()
        myTabPage.Text = "TabPage" & (TabControl1.TabPages.Count + 1)
        TabControl1.TabPages.Add(myTabPage)
also added this line of code to add a webbrowser with every new tab
VB.NET:
myTabPage.Controls.Add(New WebBrowser())

its working great but only problem is i want to be able to change the url on the new tab in the webpage( the selected tab) using the same textbox

any suggestions or solutions?
 
Last edited by a moderator:
did you mean something like this?
VB.NET:
DirectCast(TabControl1.SelectedTab.Controls(0), WebBrowser).Navigate(TextBox1.Text)
 
Back
Top