Ah ok I figured it out.
When it loaded up it didnt have a control called 'tabs' so I just added one and it worked.. Thats what you were getting at right?
Thanks guys for the help :)
Printable View
Ah ok I figured it out.
When it loaded up it didnt have a control called 'tabs' so I just added one and it worked.. Thats what you were getting at right?
Thanks guys for the help :)
its just incase the webbrowser doesnt naviagete or network unavailble due to your coding so there for the tabs will just ignore these errors and add tab
yeap i was no problem matey
there are some links that if we click on will open a new window on the internet explorer is it posible to make them open in a new tab?
i used this code to cancel links to open in new windows (IE) but what should i write where X to open the link i clicked on in a new tab?
X is the url stringCode:Private Sub currentBrowser_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles currentBrowser.NewWindow
e.Cancel = True
Me.tabs.AddTab(X)
End Sub
Hey there, it looks like you're getting on well with this sample project. I'm a young learner in programming, (really young... you'll be surprised). I've been learning quite alot about Visual Basic '08 and I have been learning for about 6 months now. I've been making alot of tabbed web browsers, and history and bookmarks.
I've made quite alot of login systems, and notepads etc (the basic microsoft programs). I've always wanted to know how to make either the link clicked in the browser open either in a new tab or in a new window. I can make the code, just I can't find the Handles to use with it.
Have you got any ideas with this JMC?
All the best,
Reece Benson
As I said previously, that's a problem I haven't tackled yet. I think it can be a bit tricky with the .NET WebBrowser control because it lacks one or two members exposed by the old ActiveX document viewer control. The WebBrowser control does have an ActiveXInstance property but I haven't worked out how to use that yet.
even in ie it doesnt do it automatically. i had this working in mine but used the com object. if i remember correctly i was cancelling navigation which stopped the new window then browsing to the blocked link in the new tab
Hey,
If anyone is interested, I have created a C# version of the latest version of the VB.Net Tabbed Web Browser. You can find it here:
http://www.vbforums.com/showthread.p...44#post3769244
It is a direct copy of the current functionality of the Tabbed Web Browser (or at least I think it is :))
Gary
I wanted to do a browser so bad I had no idea that this is a project that gets done to death. Great post anyway.
I am using vb 2008 express and I downloaded this project but various parts seem to be missing, and I get these warnings:
Could not find type 'TabbedWebBrowser.WebBrowserTabControl'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built.
and
The variable 'tabs' is either undeclared or was never assigned.
And this exception at runtime:
NullReferenceException was unhandled
Object reference not set to an instance of an object.
Please help!!! :confused: :(
Hey,
Am I right in saying that you get this error in the IDE when you try and open the MainWindow Form in design mode?
Can you take a screen shot of what you are seeing?
Gary
Opening the MainWindow Form in design mode works fine (although it does look a bit wierd). Here it is:
http://i67.servimg.com/u/f67/15/07/4...h/screen11.jpg
The exception however is when I debug it:
http://i67.servimg.com/u/f67/15/07/4...h/screen10.jpg
Does this help?
Hey,
When you opened the project in 2008 Express, did it go through a conversion process? If so, were there any errors? Did you change any of the code once you downloaded it?
The screen shot that you have shown suggests that the WebBrowserTabControl is not being found, and placed on the form surface. That is why you are getting the null reference exception.
Gary
Hey,
As a test, I have just downloaded the source code again from the original post, and opened it up in Visual Studio 2008 Team Edition, and it worked perfectly. I am just installing Visual Basic 2008 and I am going to do the same test.
Will post back once it is installed.
Gary
Bydo you mean Visual Studio 2008 Express Edition, or an edition you payed for?Quote:
Visual Studio 2008 Team Edition
Hey,
This is a higher version of Visual Studio that I get through my MSDN Subscription. It isn't free.
I have just tested the download through VB 2008 Express, and it works, so I am not sure what is going on here. Is it possible that you can zip up the folder containing the code that you are trying to run, and post it here?
Gary
Out of curiousity, can you try the download here:
http://www.vbforums.com/showthread.p...42#post3769342
This is a project which extends the work done by jmcilhinney. The one difference is that it was created in Visual Studio 2008, where as this project was created in Visual Studio 2005. There really shouldn't be any difference, but it would be interesting to see if it works for you or not.
Gary
Hey,
Let's back up a step here...
Looks like I spoke to soon when I said that is was working fine within Visual Basic 2008 Express Edition. I have just done the conversion again, and looks like I have got the same problem as you. For some reason, something has gone wrong with the conversion.
Follow these steps to get it working.
1) Open the MainWindow.Designer.vb file
2) Search for the word "tabs" in this document (you should only find one reference)
3) Delete the entire line that the word tabs is in, i.e. "Private WithEvents tabs As TabbedWebBrowser.WebBrowserTabControl"
4) Go to design view, and drag a "WebBrowserTabControl" onto the form surface and set the following propreties:
- Name - tabs
- Dock - Fill
- TabPages - Delete all existing tabs
And that should be you back in business.
Hope that helps!!
Gary
Thanks so much for your help Gep13.
In the end I got it working by re-downloading the source and re-converting it.
Its obviously very temperamental in vb express editions.
The only thing now is that, i've edited some of it into my own vb.net web browser and I get the following errors:
'AddTab' is not a member of 'System.Windows.Forms.TabControl'.
'SelectedWebBrowser' is not a member of 'System.Windows.Forms.TabControl'.
'SelectedWebBrowser' is not a member of 'System.Windows.Forms.TabControl'.
'SelectedWebBrowserTabPage' is not a member of 'System.Windows.Forms.TabControl'.
'PerformClick' is not a member of 'System.Windows.Forms.PictureBox'.
'PerformClick' is not a member of 'System.Windows.Forms.PictureBox'.
'PerformClick' is not a member of 'System.Windows.Forms.PictureBox'.
'PerformClick' is not a member of 'System.Windows.Forms.PictureBox'.
'PerformClick' is not a member of 'System.Windows.Forms.PictureBox'.
'PerformClick' is not a member of 'System.Windows.Forms.PictureBox'.
'SelectedWebBrowser' is not a member of 'System.Windows.Forms.TabControl'.
Do you know how I could fix these errors?
Thanks again Gep13!
Hey,
Without knowing about exactly what source you are referring to, and what changes you are making, it is difficult to say.
Having said that, the first four that you mention are related to the additional methods that jmcilhinney added to a class, WebBrowserTabControl, that inherits from TabControl. From the look of it, you are not using this inherited class, but rather the standard TabControl. Is that correct?
Also, do a search for PerformClick in your code, are you attempting to access a member called PerformClick on a PictureBox, if so, this is not going to work.
Gary
Hey,
There isn't an equivalent.
What you should do is the following...
1) Take the code that is currently in the PictureBox's Click event and create a new method that does all that work
2) Call this method from within the Click Event
3) Call this method from the other place that you want to call PerformClick
Hope that makes sense.
Gary
Thanks, that should help.
On the tabbed web browser project's main window there is a tab control called tabs. In the properties section of this control there are two properties called: SelectedWebBrowser and SelectedWebBrowserTabPage. These properties aren't on normal tab controls. How did the tab control get these properties, and if I get them on my tab control, could it fix some of my errors?
Hey,
As I mentioned in a previous post, jmcilhinney extended the regular TabControl and created the WebBrowserTabControl. Into this, he added the members that you mention. In order to have these, you would also need to create your own control, and have it inherit from TabControl.
The tabs control is an instance of the WebBrowserTabControl class, not TabControl.
Gary
Hey,
Does that mean you have got it to work?
Gary
Hi
I have consult this code, but problem of Progress Bar for Each tab is still there please can you extend you tutorial and handle this problem . I shall be thank full to you
You need to look a bit harder because this project already does handle progress. It displays a progress bar in the status bar at the bottom if and when the current tab is downloading. As you switch between tabs the progress bar is displayed, hidden or updated to reflect the new current tab.
can you help me to do same in vb 2008 your code is in 2005 most of commands not runs. Please .....
Not true. VB 2008 adds some things that won't work in VB 2005 but everything that already existed in VB 2005 still exists and works exactly the same way in VB 2008. I've opened this very project myself in VS 2008 and it upgraded and ran without issue. I haven't tried in VB Express 2008 but I would expect that to do the same. If you're having some specific issue then you need to address that specific issue. Even if you have to create a new project, all the classes and code could be added directly and it would work.
I seem to be having a problem of putting the WebBrowserTabControl component in the toolbox, ive tried compiling the WebBrowserTabControl.vb and WebBrowserTabPage.vb on their own, to make a dll file, then add it to the toolbox it wont let me, ive even tried draggin the WebBrowserTabControl to the form, it only shows a circle with a line in the middle meaning im not allowed.
Any help apprecieated, ive probably missed something.
I forgot to mention im using Visual Studio 2008 Pro
Tabbed WebBrowser working fine, but now I want to use use the WebBrowserDocumentCompletedEvent, I have :-
but it never gets called. ... any one got any ideas?Code:Private Sub _browser_DocumentCompleted(ByVal sender As Object,_
ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) _
Handles _browser.DocumentCompleted
MsgBox("doc complete")
End Sub
Solution found here:-
http://www.vbforums.com/showthread.php?t=641086
many thanks to Decimate.
@jmcilhinney
Which code has your latest update
Hi jmcilhinney.
I'm making my own tabbed browser and its similar to yours. I've gotten pretty far and I need some help. I want to make it so that a middle click on a link would open up a new tab. I don't know how to make that event happen. Is it impossible because the browsers are made on the fly?
Hello,
The MouseDown event:
http://msdn.microsoft.com/en-us/libr...mousedown.aspx
You can look at the input event args to determine which button was clicked. You can find an example here:
http://www.vbdotnetheaven.com/Upload...useEvents.aspx
Gary