Page 2 of 3 FirstFirst 123 LastLast
Results 41 to 80 of 101

Thread: Tabbed WebBrowser - a work in progress

  1. #41
    Lively Member
    Join Date
    May 2008
    Posts
    111

    Re: Tabbed WebBrowser - a work in progress

    hey JMC Just wanted to say nice work I learned alot about vb.net looking through this project...
    So I just wanted to say thanks...

  2. #42
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: Tabbed WebBrowser - a work in progress

    I just noticed your comment on my custom TabControl Codebank submission. Thanks for that! I would be pleased to see "my" context-menu TabPages in this project!

    Still, I'm not sure if my project is of much help for this. My aim was to be able to specify a different ContextMenu of your own choice to every TabPage, so you would not be limited to having the same ContextMenu on each TabPage. However, I can't see much use for different ContextMenu's in a webbrowser, they would probably be the same everywhere, in which case it would be much easier to handle the ContextMenu displaying differently (for one, you would not need to create a Designer class...).

    My Tabbed MDI Editor codebank submission uses a much easier way to display a ContextMenu (one ContextMenu per TabControl, not separate per TabPage) by simply setting the TabControl's ContextMenu property, and checking for the SelectedTab in the ContextMenu_Opening event.

  3. #43
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: Tabbed WebBrowser - a work in progress

    i am interested in the owner-drawn close buttons promised. I've managed to get something like this to work in a project i am working on, but i am unsure of the best way to go about it. I would like the "hot" effect when it's moused over (a giant close button for a media center program) but i have been unable to actually find anything besides the standard button in the owner-draw.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  4. #44

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

    Re: Tabbed WebBrowser - a work in progress

    I've been concentrating on C# code examples for a while but I will get back to this.
    Last edited by jmcilhinney; Dec 24th, 2008 at 09:46 PM.
    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

  5. #45
    Member
    Join Date
    Dec 2008
    Posts
    49

    Re: Tabbed WebBrowser - a work in progress

    um... where do I put the code?

    I am new 2 VB.... just started 2day

  6. #46
    Member
    Join Date
    Dec 2008
    Posts
    49

    Re: Tabbed WebBrowser - a work in progress

    Quote Originally Posted by austinjf785
    um... where do I put the code?

    I am new 2 VB.... just started 2day
    k, I think I know where to put it... but....

    Nothing is happening.

  7. #47
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: Tabbed WebBrowser - a work in progress

    Quote Originally Posted by austinjf785
    k, I think I know where to put it... but....

    Nothing is happening.
    You don't put the code anywhere, it is a complete project you can open and run. If you want to incorporate it into your own project, I think the meaning of this example is that you read it, try to understand what it does, and then recreate it in your own project. Once you understand how the code works you will have little trouble recreating it (especially if you keep a second instance of Visual Studio running alongside so you can peek sometimes, that's what I do!).

    Also, "nothing is happening" means nothing, you need to be more specific. I also don't think this thread is supposed to be for basic questions on this example.

  8. #48
    Member
    Join Date
    Dec 2008
    Posts
    49

    Re: Tabbed WebBrowser - a work in progress

    Quote Originally Posted by NickThissen
    You don't put the code anywhere, it is a complete project you can open and run. If you want to incorporate it into your own project, I think the meaning of this example is that you read it, try to understand what it does, and then recreate it in your own project. Once you understand how the code works you will have little trouble recreating it (especially if you keep a second instance of Visual Studio running alongside so you can peek sometimes, that's what I do!).

    Also, "nothing is happening" means nothing, you need to be more specific. I also don't think this thread is supposed to be for basic questions on this example.
    Oh, okay

    NO COMMENT on the rest of it

  9. #49
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: Tabbed WebBrowser - a work in progress

    it is acceptable to ask question about the project in the thread, but if you stray too far off topic you are risking sanctions from the moderators and a deletion of your posts. See page 1.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  10. #50
    Addicted Member
    Join Date
    Jul 2009
    Posts
    150

    Re: Tabbed WebBrowser - a work in progress

    i want to know how to make the tabs document change to the url which the combobox navigates too and how to change the tabs respond commands like ie8 as in if i click a tab it selects it how to add a close button to the tab like ie8 and how to make add events for url to display in the bottom left hand corner like IE8 look at the pic below i want to embed this into my Web Browser please any1 Help Me

  11. #51
    Addicted Member
    Join Date
    Jul 2007
    Location
    Slovenia
    Posts
    131

    Question Re: Tabbed WebBrowser - a work in progress

    How can I add those components to my project's toolbox?
    If this post helped you, rate it!

  12. #52

    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 Miha2c30 View Post
    How can I add those components to my project's toolbox?
    This doesn't really have anything to do with the topic of this thread specifically. Adding items to the Toolbox is the same no matter what they are.

    When you declare components in a solution they will automatically become available in the Toolbox within that solution after you build. If you want to add a component to the Toolbox permanently then you need to declare in a project that compiles to a DLL, i.e. a Class Library or Windows Control Library project. You can then add the component(s) in that DLL to the Toolbox the same way as any other DLL: by right-clicking the Toolbox or from the main menu.
    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. #53
    Member
    Join Date
    Jun 2009
    Posts
    47

    Re: Tabbed WebBrowser - a work in progress

    Is this suppose to be able to work in Visual Basic Express 2008? I imported it but got errors, I have access to the code etc but when I debug it gives errors. Anyway I probably shouldn't need to run just find the code I am looking for, I have had a look through and have not been able to see how you handle popups/new windows being launched from a hyperlink. That is why I wanted to run the program so I could see if new windows opened up in new a tab, if so then I could look through the code to find out where you handle it. So as I can't run it, I will assume that a new window will open in a new tab and if this is the case, where should I be looking in the code for this. I can't seem to find newwindow anywhere. Could someone please point me in the right direction?

  14. #54

    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 nzwogboy View Post
    Is this suppose to be able to work in Visual Basic Express 2008? I imported it but got errors, I have access to the code etc but when I debug it gives errors. Anyway I probably shouldn't need to run just find the code I am looking for, I have had a look through and have not been able to see how you handle popups/new windows being launched from a hyperlink. That is why I wanted to run the program so I could see if new windows opened up in new a tab, if so then I could look through the code to find out where you handle it. So as I can't run it, I will assume that a new window will open in a new tab and if this is the case, where should I be looking in the code for this. I can't seem to find newwindow anywhere. Could someone please point me in the right direction?
    Several people have said that they get errors but noone yet has told me what the errors are so I simply can't help. I've downloaded my own attachment and successfully opened it in VS 2005 and VS 2008. I haven't tried VB Express as I no longer have it installed.

    I haven't got as far as handling popups yet so I'm afraid I can't help you there, although there have definitely been posts on the topic in the VB.NET forum.
    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. #55
    Member
    Join Date
    Jun 2009
    Posts
    47

    Re: Tabbed WebBrowser - a work in progress

    Thanks anyway. The error I get is the
    Code:
    Me.tabs.AddTab()
    it says "NullReference Exception was unhandled" "Object reference not set to an instance of an object."

  16. #56
    Member
    Join Date
    Jul 2008
    Posts
    42

    Re: Tabbed WebBrowser - a work in progress

    Im getting the same error as nzwogboy.

    It throws an exception at runtime

  17. #57
    Addicted Member
    Join Date
    Jul 2009
    Posts
    150

    Re: Tabbed WebBrowser - a work in progress

    TabControl.TabPages.Add(X)

    my example is add tabcontrol name it tabcontrol in properties in design name and called tabpage1 as tabpage in design name on properties

  18. #58
    Member
    Join Date
    Jul 2008
    Posts
    42

    Re: Tabbed WebBrowser - a work in progress

    Quote Originally Posted by pillhead2007 View Post
    TabControl.TabPages.Add(X)

    my example is add tabcontrol name it tabcontrol in properties in design name and called tabpage1 as tabpage in design name on properties
    I dont really know what you just said. :[

  19. #59
    Addicted Member
    Join Date
    Jul 2009
    Posts
    150

    Re: Tabbed WebBrowser - a work in progress

    basically create new form add tabcontrol from toolbox then set its properties (design Name)should be default called tabcontrol1 call it TabControl .... then click the white window underneath go to its properties and should be called by default TabPage1 call it Tabpage ...... then go to toolbox add web browser and go to its properties should be called by default WebBrowser1 call it WebBrowser Then Add A Button double Click that Button And Add this code to that button code

    On Error Resume Next
    Dim X As New TabPage
    X.Text = Me.ActiveBrowser.DocumentTitle
    TabControl.TabPages.Add(X)
    Dim Y As New WebBrowser
    Y.Dock = DockStyle.Fill
    X.Controls.Add(Y)

  20. #60
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: Tabbed WebBrowser - a work in progress

    ignoring errors?

  21. #61
    Member
    Join Date
    Jul 2008
    Posts
    42

    Re: Tabbed WebBrowser - a work in progress

    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

  22. #62
    Addicted Member
    Join Date
    Jul 2009
    Posts
    150

    Re: Tabbed WebBrowser - a work in progress

    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

  23. #63
    Addicted Member
    Join Date
    Jul 2009
    Posts
    150

    Re: Tabbed WebBrowser - a work in progress

    yeap i was no problem matey

  24. #64
    Lively Member snakegaer's Avatar
    Join Date
    Jul 2007
    Posts
    80

    Re: Tabbed WebBrowser - a work in progress

    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?

  25. #65
    Lively Member snakegaer's Avatar
    Join Date
    Jul 2007
    Posts
    80

    Re: Tabbed WebBrowser - a work in progress

    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?

    Code:
        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
    X is the url string

  26. #66

    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 snakegaer View Post
    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?
    That's a feature I haven't got around to tackling yet. I'm fairly sure that other people have posted questions and answers on the same topic in the VB.NET forum, but I have no specific links I'm afraid.
    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

  27. #67
    New Member
    Join Date
    Dec 2009
    Posts
    1

    Re: Tabbed WebBrowser - a work in progress

    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

  28. #68

    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 Reece Benson View Post
    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.
    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

  29. #69
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: Tabbed WebBrowser - a work in progress

    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
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

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

    Re: Tabbed WebBrowser - a work in progress

    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

  31. #71

    Re: Tabbed WebBrowser - a work in progress

    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.

  32. #72
    Junior Member Haza360's Avatar
    Join Date
    Apr 2010
    Posts
    30

    Re: Tabbed WebBrowser - a work in progress

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

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

    Re: Tabbed WebBrowser - a work in progress

    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

  34. #74
    Junior Member Haza360's Avatar
    Join Date
    Apr 2010
    Posts
    30

    Re: Tabbed WebBrowser - a work in progress

    Opening the MainWindow Form in design mode works fine (although it does look a bit wierd). Here it is:


    The exception however is when I debug it:

    Does this help?

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

    Re: Tabbed WebBrowser - a work in progress

    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

  36. #76
    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,

    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
    Yes, I converted it but there were no errors.
    I have not edited any of the code.

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

    Re: Tabbed WebBrowser - a work in progress

    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

  38. #78
    Junior Member Haza360's Avatar
    Join Date
    Apr 2010
    Posts
    30

    Re: Tabbed WebBrowser - a work in progress

    By
    Visual Studio 2008 Team Edition
    do you mean Visual Studio 2008 Express Edition, or an edition you payed for?
    Last edited by Haza360; Apr 10th, 2010 at 10:18 AM. Reason: Mistake

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

    Re: Tabbed WebBrowser - a work in progress

    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

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

    Re: Tabbed WebBrowser - a work in progress

    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

Page 2 of 3 FirstFirst 123 LastLast

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