Results 1 to 12 of 12

Thread: WebBrowser control substitute

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    Posts
    4

    Talking

    I am looking for a substitute for the WebBrowser control (Microsoft Internet Controls). Preferably something that has no external dependencies. My goal is take away the ability for the end users to update the control on their own, which is what currently happens when they download an update to IE. Does anybody have any ideas on a good control to use. I prefer something with the basic functionality such as displaying html documents and hyperlinks. Any help is much appreciated.

    Brian

  2. #2
    Guest
    Why not reference the IE control? (Project > References > Microsoft Internet Controls) and then you can use it like this (without the user being able to control it):

    Code:
    Dim IE As New InternetExplorer
    
    Private Sub Command1_Click()
        
        'Navigate to Vb-World
        IE.Navigate "http://www.vb-world.net"
        'Get it's source (if John doesn't mine :rolleyes: )
        Text1.Text = IE.Document.documentElement.innerHTML
    
    End Sub
    And then the user won't see it.

  3. #3
    Guest
    You could even do it without referencing the IE or setting it as a Custom Control.

    Code:
    Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
    
    Private Function GetHTML(site As String) As String
        Dim IE As Object
        Set IE = CreateObject("InternetExplorer.Application")
        IE.Navigate (site)
        Do While IE.busy = True
            Sleep 500
        Loop
        GetHTML = IE.Document.body.innerhtml
        Set IE = Nothing
    End Function
    
    
    Usage
    
    
    Private Sub Command1_Click()
        Text1.Text = GetHTML("http://www.vb-world.net")
    End Sub

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    Posts
    4

    Still need a new web browser control

    Thanks for your replies. Very much appreciated. My application uses the WebBrowser exactly as you have suggested. The problem we're having is this (please bear with me):

    (1) we incorporate the WebBrowser into the application and write the necessary code to build functionality
    (2) we distribute the application to end users
    (3) in six months IE 5.5 is available and end user downloads latest and geatest to his computer
    (4) since IE 5.5 has added new features (and perhaps Microsoft has stopped supporting some old features) the application breaks.

    In short, the new version of IE seems to interfere with the ealier version of the WebBrowser component that is integrated into the application. So what I'm looking for is a third party control similar to VB's WebBrowser that an end user is unlikely to accidentally update.

    Thanks in advance.
    Brian

  5. #5
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600
    Hi bnadel.

    I understand the problem you are having. Although I use the webbrowser control a lot, I've never really considered the possibilty of the user downloading a newer version of IE than the one that was used in developing an app.

    As a suggestion (which will take some work on your part), you can code your app in such a way that it automatically checks a website that you maintain for updates to IE (and your program). This would mean that you will have to stay abreast of new versions of IE. If a new version comes out that effects the functionality of your app, you will have to change your app so that it continues to function correctly with the new webbrowser control. When the user's program goes to your website and finds that a newer version of your app is available, you can have the app on the user's machine automatically update itself from the webpage, to take into account the new version. This process is similar to what Windows Update does.

    I've been thinking about developing a program like this that will automatically update the version of itself on a user's PC based on there being a new version available as indicated by a check that the program does to a webpage. However, I haven't had a chance to do it.

    If you give some specifics about what your app does, I may be able to offer another alternative because I'm very familiar with the webbrowser control.

    In the meantime, if you find a 3rd party webbrowser that solves this problem, please post it on this website so that I (and others here) will know about it.

    Thanks.

  6. #6

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    Posts
    4

    my application

    OneSource,

    Thanks for your reply. My application organizes and displays pharmaceutical drug information stored in an Access mdb file. The main display vehicle is the webbrowser with a toolbar for navigation. Each time the user chooses a new item or a hyperlink I construct a temp html page to display. In constructing the temp html page I use a CSS file as well. So there is no external web page browsing at all. I only display internally constructed html.

    My boss suggested I create my own html browser using the Rich Text Box as a starting point, but I find the idea unappetizing. I much prefer finding a replacement browser with no external dependencies, from a company with some longevity. So far, I have been working with a demo browser control called Webster Pro from Home Page Software, Inc. located in Santa Monica, CA. However, it only supports HTML 3.2 (which suggests that there is little continuing development) and it doesn't support CSS which turns out to be an important requirement for me. On the plus side, their version "S" of this control is completely self contained (no external dependcies), which is a critical requirement for me.

    Just last night I spent a bunch of time doing google searches for alternatives and I found a bunch of resources. As I evaluate them I'll post my results if you're interested.

    Meanwhile, if you have any ideas for how I can continue using the webbrowser control in a way that the application isn't exposed to Windows and IE updates I would love to hear them. Perhaps there is some hidden undocumented property that prevents the dll reference from being changed or removed. Maybe a Win API call?

    Brian

  7. #7
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600

    An idea

    Meanwhile, if you have any ideas for how I can continue using the webbrowser control in a way that the application isn't exposed to Windows and IE updates I would love to hear them.
    I haven't actually tried this, but I think it might work.

    Create a user control and embed a webbrowser control on it. Compile the OCX and use it in your app in replacement of the normal webbrowser control.

    I think that this may shield your app from IE updates since the project isn't directly referencing the webbrowser control.

    Like I said earlier, I haven't tried this, but it's worth a shot. Let me know how it goes.

  8. #8
    Guest
    You could copy all the ocx and dll's needed by the webbrowser control to the folder of your application.

    When something loads it firsts check the application folder and then the system folder so it should load the files in your folder.

    That way if people update the explorer your files remain intact.

    This works for most control but might not work for IE though.

  9. #9
    New Member
    Join Date
    Apr 2000
    Posts
    6

    Problems there

    There are difficulties with the last two posts.

    (1)Adding the web browser control to a user control does remove a dependancy to it from the calling project... however the user control now has this dependency! So that won't work.

    (2)The last post ignored the realities of activeX referencing: location information is gleaned from the registry.

    I suggest you scan http://www.componentsource.com for alternatives to the web browser control. I doubt whether you will find components that implement CSS but I may be wrong. However there should be components that display HTML.
    Good luck!


  10. #10

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    Posts
    4

    Thumbs up Thanks for the suggestions

    Higgins and all,

    Thanks for the suggestions. I have just finished browsing at http://www.componentsource.com but have had no luck. Last week I found a number of sites with lots of references to alternative webbrowsers. Here's a couple of the better ones:

    http://www.browserlist.browser.org/
    http://www.stars.com/Software/Browsers/

    So far I haven't had a chance to really evaluate any of the browsers, though. My project focus has shifted slightly for the timebeing. I should get back to it in Feb.

    OneSource's suggestion of wrapping the webbrowser control in an ActiveX control sure sounded promising. If that ain't creative thinking, I don't what is. Unfortunately, the ActiveX control just adds a layer to the reference chain rather than truely wrapping it.

    Azmoddan's suggestion seems good. I don't understand Higgins' point when he says "(2)The last post ignored the realities of activeX referencing: location information is gleaned from the registry." What is the implication of this? My understanding is unclear.

    Brian

  11. #11
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    Well, if you end up not finding anything that fits your needs, I would recommend going back to the InternetExplorer object (as Matthew Gates described earlier) and using late binding to manipulate it.

    Microsoft is pretty good with keeping their interfaces compatible throughout each version (at least with their office products, and I would assume IE as well) so I would feel confident that my app would work after a browser upgrade

    just my 2 cents

  12. #12
    New Member
    Join Date
    Apr 2000
    Posts
    6

    The registry

    Hi Brian

    I was replying to Azzmodans post.

    What I meant was this:
    When an activeX object is loaded by the OS its location is found from the registry and not by the usual search through Winnt/System App.path etc. You can confirm this by registering a component on your machine in an 'out of the way' directory (eg c:\test). You will still be able to use the component. The implications of this are that an install routine can find your component and deinstall it in favour of a version you may not be happy with.

    Apologies for the componentsource advice: I had assumed you would find an alternative to the MS browser control there.

    cheers
    Phillip
    XML, C++, VB, Web Development
    PROUT AG - Germany

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