Re: Tabbed WebBrowser - a work in progress
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
Re: Tabbed WebBrowser - a work in progress
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!
Re: Tabbed WebBrowser - a work in progress
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
Re: Tabbed WebBrowser - a work in progress
Quote:
Originally Posted by
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
Silly me! Is there an equivalent of PerformClick that I can use for a picture box?
Re: Tabbed WebBrowser - a work in progress
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
Re: Tabbed WebBrowser - a work in progress
Thanks, that should help.
Re: Tabbed WebBrowser - a work in progress
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?
Re: Tabbed WebBrowser - a work in progress
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
Re: Tabbed WebBrowser - a work in progress
Quote:
Originally Posted by
gep13
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
Thanks again Gep13!
Re: Tabbed WebBrowser - a work in progress
Hey,
Does that mean you have got it to work?
Gary
Re: Tabbed WebBrowser - a work in progress
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
Re: Tabbed WebBrowser - a work in progress
Quote:
Originally Posted by
dewshare
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.
Re: Tabbed WebBrowser - a work in progress
can you help me to do same in vb 2008 your code is in 2005 most of commands not runs. Please .....
Re: Tabbed WebBrowser - a work in progress
Quote:
Originally Posted by
dewshare
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.
Re: Tabbed WebBrowser - a work in progress
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
Re: Tabbed WebBrowser - a work in progress
Tabbed WebBrowser working fine, but now I want to use use the WebBrowserDocumentCompletedEvent, I have :-
Code:
Private Sub _browser_DocumentCompleted(ByVal sender As Object,_
ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) _
Handles _browser.DocumentCompleted
MsgBox("doc complete")
End Sub
but it never gets called. ... any one got any ideas?
Re: Tabbed WebBrowser - a work in progress
Solution found here:-
http://www.vbforums.com/showthread.php?t=641086
many thanks to Decimate.
Re: Tabbed WebBrowser - a work in progress
@jmcilhinney
Which code has your latest update
Re: Tabbed WebBrowser - a work in progress
Quote:
Originally Posted by
coolcurrent4u
@jmcilhinney
Which code has your latest update
If I make changes, I always update the original attachment.
Re: Tabbed WebBrowser - a work in progress
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?
Re: Tabbed WebBrowser - a work in progress
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