Adblock breaks this site

webbrowser question

Discussion in 'Programming General' started by mama luigi, Jun 17, 2010.

  1. mama luigi

    mama luigi Newcomer

    Joined:
    May 5, 2010
    Posts:
    11
    Referrals:
    0
    Sythe Gold:
    0
    webbrowser question

    i am creating a webbrowser and i have encountered a problem i cannot seem to fix.

    My webbrowser is a tabbed webbrowser and whenever i switch tabs, the textbox is supposed to show the current page address. Example:

    I have two tabs open, one is on Google and the other tab is on Yahoo. I loaded google last so the textbox says "Http://www.google.com", then i click on the yahoo tab, and it still says "http://www.google.com". How can i fix it so the textbox will say "http://www.yahoo.com" whenever i click on the yahoo tab, and will change back to "http://www.google.com" if i click on the google tab again.


    Sorry if this doesn't make any sense , and thank you in advance
    - mama luigi
     
  2. blindkilla

    blindkilla Guru
    $25 USD Donor New

    Joined:
    Jun 22, 2005
    Posts:
    1,896
    Referrals:
    0
    Sythe Gold:
    6
    Discord Unique ID:
    282000633404456960
    Discord Username:
    sogord
    webbrowser question

    I've never used browser controls. Your best bet is probably post this on stackoverflow.com.
     
  3. itsboom

    itsboom Forum Addict

    Joined:
    May 7, 2010
    Posts:
    290
    Referrals:
    0
    Sythe Gold:
    0
    webbrowser question

    Try posting this on dreamincode.com
    Make sure you are detecting when a window gains focus, then changing the textbox
     
  4. Proton

    Proton Newcomer
    Banned

    Joined:
    Jun 29, 2010
    Posts:
    6
    Referrals:
    2
    Sythe Gold:
    10
    webbrowser question

    dreamincode.com is a great site for this
     
  5. Usman55

    Usman55 Newcomer

    Joined:
    Oct 11, 2008
    Posts:
    15
    Referrals:
    0
    Sythe Gold:
    0
    webbrowser question

    I understand your problem. I recently made a webbrowser too... And as for your problem, put in the tablcontrol1.selectedtabchanged or maybe selectedindexchanged the code to set the textbox's text to webbrowser's url. it's easY!
     
  6. Nemesis4895

    Nemesis4895 Member
    Banned

    Joined:
    Oct 7, 2010
    Posts:
    38
    Referrals:
    0
    Sythe Gold:
    0
    webbrowser question

    Put this in a function for each tab when theyre clicked.
    Code:
    Private Sub NewTab2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabPage2.Click
            Dim URL As String = Browser.Url.ToString
            TextBox2.Text = URL
        End Sub
     
< Problem reading data and storing it | Visual Basic 2010 - Need help >


 
 
Adblock breaks this site