Results 1 to 5 of 5

Thread: tabbed webbrowser, need help!

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    115

    tabbed webbrowser, need help!

    Well, i decided to continue my learning of vb.net (2005) by creating a webbrowser. I got all the basic stuff in, pluss some neat extra settings untill i realized: "Hey, tabbed browsing is the only way to browse". And then i tried to implement it, but i just cant make it work.

    I am having troubles with the following:

    When i click the "new tab" button on my form, a new form comes up with a browser in it, but then the first one is left blank, as if the webbrowser control got moved.

    I have no idea how to make it so that when you type the url in the textbox and hit go, the webbrowser in the active tabpage navigates.

    If needed, i will post any code you like, but since its all screwed up anyways.. i am hoping on some valuable input..


    Cheers!

  2. #2
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: tabbed webbrowser, need help!

    Ive done a tabbed webbrowser...Could you show us some code? The code for adding a new tab and such.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  3. #3
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: tabbed webbrowser, need help!

    I think you should upload your whole project, it looks like you have a serious problem with the basics
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  4. #4
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: tabbed webbrowser, need help!

    Try:

    VB Code:
    1. Dim tbNewTab As New TabPage("New Tab")
    2. TabControl1.TabPages.Add(tbNewTab)
    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    115

    Re: tabbed webbrowser, need help!

    code for new tab:

    VB Code:
    1. Public i As Integer      
    2. Dim Browsercollection As New ArrayList      
    3. Dim w As New WebBrowser
    4. Dim t As New TabPage
    5.  
    6.         TextBox1.Width = (Me.Width / 2)
    7.         w.Dock = DockStyle.Fill
    8.         w.Navigate("about:blank")
    9.         t.Text = "Blankpage " & i
    10.         TabControl1.Controls.Add(t)
    11.         t.Controls.Add(w)
    12.         Browsercollection.Add(w)
    13.         i = i + 1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width