Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Making tabs on browser?
#1
Hey i need a bit of help with my browser, i'm going to add tabs, and i actually don't know the trick, could anyone help me?

P.S I use Combobox and webbrowser
Reply
#2
Here you go good sir: Youtube ~ How To Make An Advanced Webbrowser In Visual Basic 2008

This is a very friendly tutorial that shows you how to make a good web browser that also includes tabs.

By advanced it means:
Code:
Deafult features, Tabs, Progressbar, Status Label ect.

Personally, I love the tutorials that the author creates.

Code:
You can download the source code from: http://www.mediafire.com/download.php?zvenznwgz2w

Code:
Or you can copy + Paste the codes:

Public Class Form1
Dim int As Integer = 0

Private Sub Loading(ByVal sender As Object, ByVal e As Windows.Forms.WebBrowserProgressChangedE ventArgs)
ToolStripProgressBar1.Maximum = e.MaximumProgress
ToolStripProgressBar1.Value = e.CurrentProgress
End Sub

Private Sub Done(ByVal sender As Object, ByVal e As Windows.Forms.WebBrowserDocumentComplete dEventArgs)
TabControl1.SelectedTab.Text = CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).DocumentTitle
ComboBox1.Text = CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).Url.ToString
End Sub

Form1_Load:
Dim Browser As New WebBrowser
TabControl1.TabPages.Add("New Page")
Browser.Name = "Web Browser"
Browser.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Bro wser)
AddHandler Browser.ProgressChanged, AddressOf Loading
AddHandler Browser.DocumentCompleted, AddressOf Done
int = int + 1
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).GoHome()

Add Tab:
Dim Browser As New WebBrowser
TabControl1.TabPages.Add("New Page")
TabControl1.SelectTab(int)
Browser.Name = "Web Browser"
Browser.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Bro wser)
AddHandler Browser.ProgressChanged, AddressOf Loading
AddHandler Browser.DocumentCompleted, AddressOf Done
int = int + 1
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).GoHome()

Remove Tab:
If Not TabControl1.TabPages.Count = 1 Then
TabControl1.TabPages.RemoveAt(TabControl 1.SelectedIndex)
TabControl1.SelectTab(TabControl1.TabPag es.Count - 1)
int = int - 1
End If

Website Properties:
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).ShowPropertiesDialog

Back:
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).GoBack()

Forward:
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).GoForward()

Refresh:
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).Refresh()

Stop:
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).Stop()

Home:
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).GoHome()

Go:
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).Navigate(ComboBox1.Text)

Timer1:
ToolStripStatusLabel1.Text = CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).StatusText
[Image: ouwg0slq0vtagvzl4u8w.jpg]

Giveaway of the Day: [Image: ticker1.png]
Reply
#3
(11-01-2009, 06:52 PM)Red X Wrote: Here you go good sir: Youtube ~ How To Make An Advanced Webbrowser In Visual Basic 2008

This is a very friendly tutorial that shows you how to make a good web browser that also includes tabs.

By advanced it means:
Code:
Deafult features, Tabs, Progressbar, Status Label ect.

Personally, I love the tutorials that the author creates.

Code:
You can download the source code from: http://www.mediafire.com/download.php?zvenznwgz2w

Code:
Or you can copy + Paste the codes:

Public Class Form1
Dim int As Integer = 0

Private Sub Loading(ByVal sender As Object, ByVal e As Windows.Forms.WebBrowserProgressChangedE ventArgs)
ToolStripProgressBar1.Maximum = e.MaximumProgress
ToolStripProgressBar1.Value = e.CurrentProgress
End Sub

Private Sub Done(ByVal sender As Object, ByVal e As Windows.Forms.WebBrowserDocumentComplete dEventArgs)
TabControl1.SelectedTab.Text = CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).DocumentTitle
ComboBox1.Text = CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).Url.ToString
End Sub

Form1_Load:
Dim Browser As New WebBrowser
TabControl1.TabPages.Add("New Page")
Browser.Name = "Web Browser"
Browser.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Bro wser)
AddHandler Browser.ProgressChanged, AddressOf Loading
AddHandler Browser.DocumentCompleted, AddressOf Done
int = int + 1
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).GoHome()

Add Tab:
Dim Browser As New WebBrowser
TabControl1.TabPages.Add("New Page")
TabControl1.SelectTab(int)
Browser.Name = "Web Browser"
Browser.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Bro wser)
AddHandler Browser.ProgressChanged, AddressOf Loading
AddHandler Browser.DocumentCompleted, AddressOf Done
int = int + 1
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).GoHome()

Remove Tab:
If Not TabControl1.TabPages.Count = 1 Then
TabControl1.TabPages.RemoveAt(TabControl 1.SelectedIndex)
TabControl1.SelectTab(TabControl1.TabPag es.Count - 1)
int = int - 1
End If

Website Properties:
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).ShowPropertiesDialog

Back:
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).GoBack()

Forward:
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).GoForward()

Refresh:
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).Refresh()

Stop:
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).Stop()

Home:
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).GoHome()

Go:
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).Navigate(ComboBox1.Text)

Timer1:
ToolStripStatusLabel1.Text = CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).StatusText

He uses TabControl, not WebBrowser.
Reply
#4
Couldn't use just combine the two. Make them work together? And he still made a tutorial on how to make a TABBED webbrowser and more which I supplied you the link to. But if you don't like it then okay. I tried.
[Image: ouwg0slq0vtagvzl4u8w.jpg]

Giveaway of the Day: [Image: ticker1.png]
Reply
#5
Use a "Tab Control" and a "Web Browser" , not a "Tabbed Web browser, and code ur tabs to load ur browser home page each time you add a tab. Why dont you just use a tabbed webbrowser ?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  What could i add to my browser? [Project] XDarkCoder 3 1,434 02-16-2013, 10:10 AM
Last Post: Swift Swim
  Zera Internet Browser rqmok1996 2 1,248 10-12-2012, 12:17 AM
Last Post: rqmok1996
  [TuT]How to create a Simple Web browser Jinu 2 750 12-17-2011, 03:13 PM
Last Post: HB Virus
  Porn Browser [C#] Scream 28 8,775 08-30-2011, 07:25 PM
Last Post: alabama

Forum Jump:


Users browsing this thread: 3 Guest(s)