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:
Private Sub HomeBtn_Click(sender As System.Object, e As System.EventArgs) Handles HomeBtn.Click
Tabbed_IE 1.GoHome()
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.
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
TextBox1.Text = Tabbed_IE1.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:
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.