Click here to Skip to main content
15,884,986 members
Articles / Desktop Programming / Win32
Tip/Trick

Tabbed IE Browser Control

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
3 Jul 2013CPOL2 min read 24.3K   8   9
Tabbed Browser Control addon

Introduction 

This DLL can be added to your tool box, and then dragged onto your form in place of the normal WebBrowser control. This one is tab based, has a custom context menu that works. 

Background 

I have read hundreds of posts on various programming sites like this one with people trying to get help with:

  • Opening link in new Tab
  • Stopping a link from opening in Internet Explorer instead of the program.
  • Using a custom Context Menu in place of the built in one. 

Having educated myself with the answers posted, I have developed this UserControl DLL that simplifies all of that. 

Using the code 

Simply add the .dll to your project by right clicking in your toolbox and selecting  "Choose Item..." and navigate to where you downloaded the Tabbed_Browser.dll. Then drag the new control from the Toolbox onto your form.

There are several Public Variables, Subs, and controls that you can manipulate with your own code. For example, you can add a button to your project, name it HomeBtn and labeled Home.  Now, in the click event (double click the button to automatically add to code) you can do:

VB
Private Sub HomeBtn_Click(sender As System.Object, e As System.EventArgs) Handles HomeBtn.Click
    Tabbed_IE 1.GoHome()
    'This activates the same public sub used by the Home contextmenustrip item. 
End Sub

or add a textbox and a timer to your project and use the following code to see what url the link or image under the mouse  points to. 

VB
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
    TextBox1.Text = Tabbed_IE1.Linx 'Accesses the public string "Linx". 
End Sub

If you prefer to use your own address bar you can make mine go away by adding this line to your form load event: "Tabbed_IE.Addressbar.dispose()". 

If you want your tabs on the left instead of the top, you can do that in your form load event with this:

VB
Tabbed_IE1.Tabby.Alignment = TabAlignment.Left

There are many more things you can manage with your own code. 

Points of Interest 

I am working on doing the same thing with the Gecko control used by Firefox and Google Chrome.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Comments and Discussions

 
GeneralMy vote of 5 Pin
rspercy655-Jul-13 10:39
rspercy655-Jul-13 10:39 
QuestionWhere's the download link? Pin
gcode14-Jul-13 1:30
gcode14-Jul-13 1:30 
AnswerRe: Where's the download link? Pin
Emmery Chrisco4-Jul-13 3:24
Emmery Chrisco4-Jul-13 3:24 
GeneralRe: Where's the download link? Pin
Ravi Bhavnani12-Jul-13 5:46
professionalRavi Bhavnani12-Jul-13 5:46 
QuestionRe: Where's the download link? Pin
rspercy654-Jul-13 4:34
rspercy654-Jul-13 4:34 
AnswerRe: Where's the download link? Pin
Emmery Chrisco4-Jul-13 4:41
Emmery Chrisco4-Jul-13 4:41 
GeneralRe: Where's the download link? Pin
rspercy654-Jul-13 13:45
rspercy654-Jul-13 13:45 
GeneralRe: Where's the download link? Pin
Emmery Chrisco5-Jul-13 3:34
Emmery Chrisco5-Jul-13 3:34 
GeneralRe: Where's the download link? Pin
rspercy655-Jul-13 10:37
rspercy655-Jul-13 10:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.