Web Browser Add Tab

ejbeaty

Member
Joined
Nov 10, 2009
Messages
12
Programming Experience
1-3
Hello.

I've created a tabbed web browser.

I use AddTab(URL) to add a new tab with a web browser.

The only problem I'm running into is that when I right click on a link and try to "open in new tab" that is not an available option.

so I need to be able to add that to the right click menu and then have it execute AddTab(URL) with the selected link.

Thanks in advance!

Public Sub AddTab(ByRef URL As String, ByRef TabControl As TabControl)
Dim NewBrowser As New CustomBrowser
Dim NewTab As New TabPage

NewBrowser.Tag = NewTab
NewTab.Tag = NewBrowser
TabControl.TabPages.Add(NewTab)
NewTab.Controls.Add(NewBrowser)
NewTab.Width = URL.Length
NewBrowser.Dock = DockStyle.Fill
NewBrowser.Navigate(URL)
 
Since this is your own web browser, you would have to create your own right click popup menu with whatever menu items you wish on it.

Are you familiar with creating menus?
 
Well not really. If it were the form I could just use the mouse_down event however In this case I would be clicking on a web browser.

Regardless, my browser inherits a number of features from IE including a right click menu. So, when I right click I automatically (without me coding it) have options to "save image as", 'open in new window", etc... So I would have to add to that menu which I dont know how to do.

Thanks
 
You can't change any of that right click context menu to my knowledge as your "Custom Browser" is basically Internet Explorer, in fact I think it even inherits all the internet explorer plugins for example goto MySpace and see if it tells you to download and install flash.
What do you mean your new tab feature dosnt show up, can you post a screenshot or something??
 
rightclick.jpg


As you can see the "add new tab" is not enabled.

Ideally what would happen is that I would be able to click on that and when I do execute my AddTab(URL) function with the proper url.

Right now I'm using hot keys for all the navigation (e.g. f4 prompts for an address then loads it in a new tab). So, if I can't do it the way I want I am open to ideas on other ways to do it.

Thanks!
 
Well I can try fiddling with some source code of my own and see if I can find the solution, don't wait on me because I cannot assure you that I will find the solution but if no one else does I might.

Hopefully I can help
 
You have to add the parts that is not there according to the schema presented. Most likely you have up to the FeatureControl key, with zero or more feature keys added to it. You then have to add the FEATURE_TABBED_BROWSING key, to that the app.exe/1 dword valuepair. No path, only filename. Notice also that when you run the app.exe in debugger its name is app.vshost.exe
 
You have to add the parts that is not there according to the schema presented. Most likely you have up to the FeatureControl key, with zero or more feature keys added to it. You then have to add the FEATURE_TABBED_BROWSING key, to that the app.exe/1 dword valuepair. No path, only filename. Notice also that when you run the app.exe in debugger its name is app.vshost.exe

Thanks John. I'll give this a go around when I get a chance and let you guys know how it turns out.
 
Back
Top