Tab Control Add webbrowser (Code, tut)

Discussion in 'Programming General' started by kharg0, Feb 5, 2008.

Tab Control Add webbrowser (Code, tut)
  1. Unread #1 - Feb 5, 2008 at 9:51 AM
  2. kharg0
    Joined:
    Feb 25, 2007
    Posts:
    131
    Referrals:
    0
    Sythe Gold:
    0

    kharg0 Active Member

    Tab Control Add webbrowser (Code, tut)

    at the begining state...

    Code:
    Public Class (form name here)
    dim tab as new tabpage
    dim theweb as new webbrowser
    add this to your buttons, also for this code u need a tab control...

    Code:
    if TabControl1.SelectedTab Is TabPage1 Then WebBrowser1.Navigate(ComboBox1.Text)
            If TabControl1.SelectedTab Is Tab Then MyWeb.Navigate(ComboBox1.Text)
    make an add tab button.. this is the code for it...

    Code:
    Dim i As Integer
            Tab.Parent = TabControl1
            i = TabControl1.TabCount - 1
            theWeb.Parent = tab
            theWeb.Visible = True
            theWeb.Dock = DockStyle.Fill
            theWeb.GoHome()

    thx tell me what u think...
     
  3. Unread #2 - Mar 24, 2008 at 5:43 PM
  4. darkkid714
    Referrals:
    0

    darkkid714 Guest

    Tab Control Add webbrowser (Code, tut)

    Seems great but you didt really explain what to start with. I have no idea where I put the second code. All cred due this is what I need. But its a bit vague. You have a combo box in there but what the hell is the combo box for. Its really confusing.
     
  5. Unread #3 - Mar 25, 2008 at 10:15 PM
  6. Elkins121
    Joined:
    Sep 18, 2007
    Posts:
    63
    Referrals:
    0
    Sythe Gold:
    0

    Elkins121 Member

    Tab Control Add webbrowser (Code, tut)

    Well, I understand him..you put the second code on the Add Tab button's "Click" procedure. The combo box is where you type in the web address.
     
  7. Unread #4 - Mar 26, 2008 at 2:21 AM
  8. Swan
    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner

    Swan When They Cry...
    Retired Global Moderator

    Tab Control Add webbrowser (Code, tut)

    Darkkid, I recommend you buy a book and read up. Some times you shouldn't have to be told where to put things to know where to put them.

    For example, if I told you to make a messagebox after the user clicked a button, most likely the first thing you would do is go to the Button's click event, wouldn't you?

    It is amazingly simple to do this if you've migrated from a language such as VB6 where there is next to no object-orientation, wouldn't you agree? I don't code either, but I work with .Net (C#, etc) quite often, so I can make sense of your code quite thoroughly.

    Edit: Sorry I forgot to comment.

    Its nice and simple, and simple is the way things should be.
     
  9. Unread #5 - Apr 9, 2008 at 12:19 AM
  10. Original VB
    Referrals:
    0

    Original VB Guest

    Tab Control Add webbrowser (Code, tut)

    Wow, thanks the tab part helped I couldn't figure out how to get it working =D thank you very much.
     
  11. Unread #6 - Jul 23, 2008 at 8:57 PM
  12. The True Gears
    Referrals:
    1

    The True Gears Guest
    $5 USD Donor

    Tab Control Add webbrowser (Code, tut)

    This is what i had for mine

    Code:
    Dim browse As New WebBrowser
            TabControl1.TabPages.Add(i, "Page " & i)
            TabControl1.SelectTab(i - 1)
            browse.Name = "vb"
            browse.Dock = DockStyle.Fill
            TabControl1.SelectedTab.Controls.Add(browse)
            i = i + 1
    And code like this for other buttons

    Code:
    CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoForward()
    CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoBack()
    Ect.
     
< One dimensional array | AutoMe Test - How good are you at cheating? >

Users viewing this thread
1 guest


 
 
Adblock breaks this site