• Log in or sign up for an account here: https://www.sythe.org/login

Tab Control Add webbrowser (Code, tut)

kharg0

Active Member
Joined
Feb 25, 2007
Sythe Gold
0
Messages
131
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...
 
arg-highlightedPosts="Array" args="" />
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.
 
arg-highlightedPosts="Array" args="" />
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.
 
arg-highlightedPosts="Array" args="" />
Member of the Month Winner
Sythe's 10th Anniversary
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.
 
arg-highlightedPosts="Array" args="" />
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.
 
arg-highlightedPosts="Array" args="" />
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.
 
arg-highlightedPosts="Array" args="" />
Runescape Gamblingrunescape gambling
Back
Top