Page 3 of 3 FirstFirst 123
Results 81 to 101 of 101

Thread: Tabbed WebBrowser - a work in progress

  1. #81
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  2. #82
    Junior Member Haza360's Avatar
    Join Date
    Apr 2010
    Posts
    30

    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!

  3. #83
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  4. #84
    Junior Member Haza360's Avatar
    Join Date
    Apr 2010
    Posts
    30

    Re: Tabbed WebBrowser - a work in progress

    Quote Originally Posted by gep13 View Post
    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?

  5. #85
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  6. #86
    Junior Member Haza360's Avatar
    Join Date
    Apr 2010
    Posts
    30

    Re: Tabbed WebBrowser - a work in progress

    Thanks, that should help.

  7. #87
    Junior Member Haza360's Avatar
    Join Date
    Apr 2010
    Posts
    30

    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?

  8. #88
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  9. #89
    Junior Member Haza360's Avatar
    Join Date
    Apr 2010
    Posts
    30

    Re: Tabbed WebBrowser - a work in progress

    Quote Originally Posted by gep13 View Post
    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!

  10. #90
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Tabbed WebBrowser - a work in progress

    Hey,

    Does that mean you have got it to work?

    Gary

  11. #91
    Member
    Join Date
    Jul 2010
    Posts
    46

    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

  12. #92

    Thread Starter
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Tabbed WebBrowser - a work in progress

    Quote Originally Posted by dewshare View Post
    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  13. #93
    Member
    Join Date
    Jul 2010
    Posts
    46

    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 .....

  14. #94

    Thread Starter
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Tabbed WebBrowser - a work in progress

    Quote Originally Posted by dewshare View Post
    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  15. #95
    Lively Member
    Join Date
    Sep 2009
    Posts
    65

    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
    Last edited by MrTree; Sep 18th, 2010 at 10:16 AM.

  16. #96
    Junior Member
    Join Date
    Jan 2011
    Posts
    26

    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?

  17. #97
    Junior Member
    Join Date
    Jan 2011
    Posts
    26

    Re: Tabbed WebBrowser - a work in progress

    Solution found here:-

    http://www.vbforums.com/showthread.php?t=641086

    many thanks to Decimate.

  18. #98
    Fanatic Member coolcurrent4u's Avatar
    Join Date
    Apr 2008
    Location
    *****
    Posts
    993

    Re: Tabbed WebBrowser - a work in progress

    @jmcilhinney

    Which code has your latest update
    Programming is all about good logic. Spend more time here


    (Generate pronounceable password) (Generate random number c#) (Filter array with another array)

  19. #99

    Thread Starter
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Tabbed WebBrowser - a work in progress

    Quote Originally Posted by coolcurrent4u View Post
    @jmcilhinney

    Which code has your latest update
    If I make changes, I always update the original attachment.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  20. #100
    New Member
    Join Date
    Apr 2011
    Posts
    1

    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?

  21. #101
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width