Results 1 to 20 of 20

Thread: [RESOLVED] VB6 Webbrowser - Compatibility with Internet Explorer 8

  1. #1
    Hyperactive Member
    Join Date
    Oct 06
    Posts
    388

    Resolved [RESOLVED] VB6 Webbrowser - Compatibility with Internet Explorer 8

    This is not a question, but a description of a solution. I hope that it may prove of interest and use to others and that more experienced VB6 users may add further comments.

    The Webbrowser control was designed to work in an integral fashion with MS Internet Explorer. However, from Internet Explorer 7 onwards, there appear to be incompatibilities between Webbrowser and Internet Explorer when the Webbrowser is being used in the VB6 design mode (ie. .vpb file).

    According to literature, any .exe program developed and generated from VB6 using a machine with IE6 or earlier will continue to work on XP machines and, it is assumed, Win 7/32 machines which have later versions of Internet Explorer installed (ie. 7 or 8)

    However the problem which arises is that when VB6 is run in design mode on a machine having Internet Explorer 7 or later the Webbrowser gives rise to "file not found" errors.

    Here is the fix I arrived at. This ONLY needs to be applied to a machine which is running / developing a VB6 Webbrowser program and which has Internet Explorer 7 or later installed. Machines which will run just the .exe program do not require further attention as far as I am aware.

    The fix described has been tested on two PCs running XP Sp3 with IE8.

    Registry changes.

    Use start-run-regedit to enter the registry. Be VERY careful to follow these instructions exactly. If in doubt, do not proceed. In any case it is advised that a back-up copy of the registry be made first, so that in event of problems the previous configuration can be reverted to.

    Find H.Key_CLASSES_ROOT / CLSID / 8856F961…….05A2 / INPROCECSERVER32
    Change the entry from C:\Windows\system32\ieframe.dll to C:\Windows\system32\SHDOCVW.dll

    Find H.Key_CLASSES_ROOT / CLSID / 8856F961…….05A2 / TOOLBOXBITMAP32
    Change the entry from C:\Windows\system32\ieframe.dll,257 to C:\Windows\system32\SHDOCVW.dll,257

    Find H.Key_LOCAL_MACHINE / SOFTWARE / CLASSES / TYPE LIB / EAB22ACO………AE0B / 1.1 / 0 / Win32
    Change the entry from C:\Windows\system32\ieframe.dll to C:\Windows\system32\SHDOCVW.dll

    And also note that in the VB6 project file for a program using the Web Browser the reference should be :

    Microsoft Internet Controls ref. C:\WINDOWS\SYSTEM32\ieframe.oca

    And in project components :

    Microsoft Internet Controls C:\WINDOWS\Systen32\SHDOCVW.dll

    Double check the accuracy of these changes, then re-start the machine.
    I can not stress more the need for absolute accuracy in making these changes. The changes will not affect other functions of the XP Sp3 machine.

    This problem must be well-known amongst VB6 Webbrowser users, but as a newcomer to the application of this control I had much difficulty in finding all of the solution above described.


    camoore

    Wales, UK

  2. #2

  3. #3
    Hyperactive Member
    Join Date
    Oct 06
    Posts
    388

    Re: VB6 Webbrowser - Compatibility with Internet Explorer 8

    Thank you Rhino Bull for your helpful contribution.

    When I first encountered this problem, my first port of call was to the Forum VB6/Earlier section and I made a search for relevant thread titles. I did not find any.

    Therefore, before posting a question, I did my best to find a solution from other sources. What I have written up is the culmination of a lot of time spent getting and testing solutions.

    I then posted here for two reasons :

    1. The information may be of use to another Forum user and the thread title should make it easy to search for.

    2. More experienced VB6 programmers, such as yourself, might add further comment.

    If you have something relevant to say about this apparent Webbrowser / IE7/8 compatibility problem - or a better solution than I have come up with - then please make a further post about it here.

    If the moderator feels that this post should be moved elsewhere, doubtless he will do that and let us know.

    camoore

    Wales, UK

  4. #4
    Lively Member
    Join Date
    Mar 09
    Posts
    127

    Re: VB6 Webbrowser - Compatibility with Internet Explorer 8

    http://www.vbforums.com/showthread.p...-runtime-error

    You'll also have to remember that x64 has it's registrysettings in another place.. Don't know if my post still works, and if it's still valid..
    In my projects all references have been changed to ieframe.dll, and it seems to even work correctly after compilation on XP.. I never had any problems since, other than the problems we have with the IDE (with sourcesafe addin) under Windows 7 (x64), but we fixed that too mostly.

    But you're right, it's not easy to find any real information on that..

  5. #5
    Hyperactive Member
    Join Date
    Oct 06
    Posts
    388

    Re: VB6 Webbrowser - Compatibility with Internet Explorer 8

    Thank you, SuperDre for the further information. I see from your referenced Forum thread (566136) that you have encountered this IE 7/8 compatibility problem and had come up with about the same solution as did I (Plus you went on to deal also with 64 bit machines).

    I wish I had found that (566136) thread when I started searching!

    Lots of VB6 programmers must surely have come across this apparent incompatibility between Webbrowser and IE 7/8, so it is a little surprising that not much seems to have been written about it. Perhaps most folk nowdays use later versions of VB than VB6, and perhaps the problem does not occur then?

    Hopefully the title of this thread will enable an easier search, and from here a user would be directed to your solution at (566136).

    camoore

    Wales, UK

  6. #6
    PowerPoster
    Join Date
    Feb 06
    Posts
    8,676

    Re: VB6 Webbrowser - Compatibility with Internet Explorer 8

    Quote Originally Posted by camoore View Post
    The Webbrowser control was designed to work in an integral fashion with MS Internet Explorer.
    No, it is part of IE.

    Quote Originally Posted by camoore View Post
    However, from Internet Explorer 7 onwards, there appear to be incompatibilities between Webbrowser and Internet Explorer when the Webbrowser is being used in the VB6 design mode (ie. .vpb file).
    Not here. Every one of my Projects is working fine and has been for years. Testing currently with IE8. Perhaps you can explain what doesn't work as you expect? Maybe a short example?

    When you want an HTML control the DHTMLEdit control tends to be much more useful. This gives you something more like a RichTextBox for HTML. Of course that isn't a web scraping tool, but then I'm not much of a web scraper so perhaps I've missed something.

  7. #7
    Hyperactive Member
    Join Date
    Oct 06
    Posts
    388

    Re: VB6 Webbrowser - Compatibility with Internet Explorer 8

    Dilettante,

    I had a XP Sp3 machine with IE8 and VB6 Enterprise edition loaded.

    Recently, for the first time, I tried to write a VB6 program incorporating a Webbrowser control. First run through in design mode it worked fine. But at subsequent runs I got an error "File not found ieframe.dll\1".

    After much internet research, I came across these similar/related threads :

    VB Forums thread 507577

    http://social.msdn.microsoft.com/For...9-b02489009aab

    The first solution I tried was to find this ieframe.dll\1 entry in the registry and change it to just ieframe.dll.

    The location was :

    HKEY_CLASSES_ROOT\TypeLib\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}\1.1\0\win32\

    remove the " \1".

    This worked just the once, but at a second attempt I got the \1 error back and that registry entry had reverted to the \1 version of the ieframe.dll.

    Therefore, eventually, I implemented the registry/component/reference changes described above, and I was able to run the VB6 program using a Webbrowser numerous times without further errors.

    From reading the above mentioned threads, it appears that the problem is connected with "Tabbed browsing settings" in IE7/8. Contributors have suggested that another solution is to remove Tabbed browsing option from your IE7/8 :-

    Tabbed browsing settings in IE - remove

    Internet Options | General | Tabs | Settings

    In the alternative, have only IE6 on your VB6 design/development machine and generate your .exe from that. According to threads (but not yet tested by me) .exe from a IE6 machine will run without problems on those with IE7/8. The problem only arises when you use a IE7/8 machine to generate VB6 programs incorporating the Webbrowser control, it would seem.

    I hope this answers your query somewhat. It is interesting that you have apparently never encountered this problem yourself.

    camoore

    Wales, UK
    Last edited by camoore; Oct 11th, 2012 at 05:32 AM.

  8. #8
    Hyperactive Member
    Join Date
    Oct 06
    Posts
    388

    Re: VB6 Webbrowser - Compatibility with Internet Explorer 8

    Further note to Dilettante :

    About "web scraping". : What I needed to achieve in my program was a. For a user to access and display a webpage within a suitable control of a VB6 program (I selected the webbrowser) then b. For a user to be able to extract the TEXT content of that displayed webpage and to copy that into a RichTextBox then c. For the user to be able to make a local PC copy of that extracted text as a .txt file

    eg. Richtextbox1.savetext "C\Folder\justsaved.txt",rtfText

    Thus far my code for this seems to be working OK. (can post here if you wish)

    I note what you say about the DHTMLEdit control, but can initially find little information about its capabilities and how to VB6 program it. If you think that it would better serve my (above mentioned) purpose, please if you can provide a pointer to a tutorial or similar which explains its VB6 code application(s).

    camoore

    Wales, UK

  9. #9
    Lively Member
    Join Date
    Mar 09
    Posts
    127

    Re: VB6 Webbrowser - Compatibility with Internet Explorer 8

    Quote Originally Posted by camoore View Post
    I note what you say about the DHTMLEdit control, but can initially find little information about its capabilities and how to VB6 program it. If you think that it would better serve my (above mentioned) purpose, please if you can provide a pointer to a tutorial or similar which explains its VB6 code application(s).
    It has some real quircks, I don't know them exactly anymore, also the control is not installed on all windows (at least I had to install it on some clients).. I'm using it for an HTML-based Email editor in our administration-software I wrote.. It isn't hard to use, I think there are even some samples on this board (which is slow as hell these days)..

  10. #10
    PowerPoster
    Join Date
    Feb 06
    Posts
    8,676

    Re: VB6 Webbrowser - Compatibility with Internet Explorer 8

    This was another standard control that truly was a "sidecar" to IE rather than being integral. It was included with Windows through XP, but was pulled starting with Vista because of some severe security holes.

    For Vista and beyond a new version was made available, with its own private TriEdit rendering engine instead of using IE's and it is no longer "safe for scripting" to avoid further security issues (cannot be used embedded in web pages anymore). So yes, you have to deal with deployment on systems with current versions of Windows.

    Some details on this can be found at Replacing the DHTML Editing Control in Windows Vista and Beyond.


    There used to be an SDK containing the libraries and a decent-sized CHM developer document. I don't see it anymore so it may be gone (if you snooze, you lose). The redist can be found at DHTML Editing Control for Applications Redistributable Package (x86). Sadly, as Microsoft continues erasing history relating to VB6 they pull information and you won't find details on usage anywhere in MSDN online.

    If you are lucky some searching may turn up a 3rd party still hosting the SDK download though.


    As I said, this is meant to be used more like a RichTextBox, allowing display and printing of HTML documents and WYSIWYG editing of HTML. It works great as a reporting tool. But it isn't meant for navigation to remote resources - though it can do it via LoadURL(), and document links can be "live." Most of the presumed quirks probably relate to the ExecCommand() method, which would be more familiar to a C/C++ programmer who has been using MSHTML and friends.

  11. #11
    PowerPoster
    Join Date
    Feb 06
    Posts
    8,676

    Re: VB6 Webbrowser - Compatibility with Internet Explorer 8

    BTW, I have this in my VBP files:

    Object={EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0; ieframe.dll

    In a few cases also:

    Reference=*\G{3050F1C5-98B5-11CF-BB82-00AA00BDCE0B}#4.0#0#..\..\..\..
    \Windows\system32\mshtml.tlb#Microsoft HTML Object Library


    ... which gives me DOM object definitions.

    I've tested both, compiling and running on Vista SP 2 and running the compiled EXE on XP SP3. No problems.

    Maybe what you have is either an issue with continued VB6 development on XP? Or maybe it has something to do with the particular reference you are setting?

    I'd guess your troubles stem from referencing Shdocvw.dll instead of using "Microsoft Internet Controls" i.e. ieframe.dll as a component (controls) library.

  12. #12
    PowerPoster
    Join Date
    Feb 06
    Posts
    8,676

    Re: VB6 Webbrowser - Compatibility with Internet Explorer 8

    I think that's it, as this Microsoft guy says in IE7 - File Not Found ieframe.dll\1:

    The reference should be to ieframe.dll, not shdocvw.dll for IE7.

    This will still add the same ShDocVw namespace, but its the one that's imported from ieframe.dll.

    -Reza
    No registry hacks required.

  13. #13
    Hyperactive Member
    Join Date
    Oct 06
    Posts
    388

    Re: VB6 Webbrowser - Compatibility with Internet Explorer 8

    Thanks again Dilettante,

    A lot of what you wrote is "over my head" due to my rather limited knowledge of VB6 (and much else). However it is doubtless most valuable comment and now is in this thread for the info. of future readers.

    As I have tried to explain, I wanted a "simple" control which could display a web page and subsequently allow (through VB6 code) a user to extract the text content (which would be scientific data in my application's case) and transfer it to a Rich Text Box, thereafter allowing the usual VB options of editing it and/or of saving it to a .txt file.

    However we deviate from the original theme of this post which was the apparent incompatibility of VB6 Webbrowser with a VB6 design mode machine running IE 7 or 8. For me, as a relatively inexperienced programmer, the Webbrowser was/is a very useful tool for downloading html. I do not seek to use it to generate/upload html - even if it has this capability.

    So the continuing ability to incorporate the Webbrowser control into VB6 generated programs seems a worthwhile objective. With that in mind, the suggestions and comments within this thread have been, and I hope will have been, of interest to readers.

    camoore

    Wales, UK
    Last edited by camoore; Oct 11th, 2012 at 06:10 PM.

  14. #14
    PowerPoster
    Join Date
    Feb 06
    Posts
    8,676

    Re: VB6 Webbrowser - Compatibility with Internet Explorer 8

    Posts #11 and #12 are about the WebBrowser control.

    As I said I'm not seeing any problem using it, with no registry hacks.

  15. #15
    Hyperactive Member
    Join Date
    Oct 06
    Posts
    388

    Re: VB6 Webbrowser - Compatibility with Internet Explorer 8

    Interesting, Dilettante. You will see from my post and the several referred to within it that people have encountered this ieframe.dll/1 error.

    After effecting the registry changes, I no longer have a problem.

    My MS Internet Controls component is SHDOCVW.DLL and the Reference is ieframe.oca on the IE8 machine.

    However, if I start a new VB project the project reference reverts to SHDOCVW.dll, and it still works!

    On my IE6 machine, both project reference and component point to SHDOCVW.dll

    I still do not think that I have come to a full understanding of this issue, which for some reason is not causing you / has never caused you any problem.

    camoore

    Wales, UK

  16. #16
    Lively Member
    Join Date
    Mar 09
    Posts
    127

    Re: VB6 Webbrowser - Compatibility with Internet Explorer 8

    Just to clarify, I'm not using shdocvw.dll reference anymore in any of my projects, I switched to ieframe.dll so no developers in our company will not have any real problems (except having to open the project, ignore the 'error accessing registry' error and reloading the project after every windows IE update). Windows 7 isn't really VB6 IDE/sourcesafe friendly, but it works..

  17. #17
    PowerPoster
    Join Date
    Feb 06
    Posts
    8,676

    Re: VB6 Webbrowser - Compatibility with Internet Explorer 8

    Bizarre.

    I've never had any Windows 7 issues with VB6 either. Of course you're ALWAYS required to run it elevated, that was spelled out in the early Dev Info released when Vista came out.

    I swear some people just go looking for trouble or something. Just keep up with changes and you shouldn't have so many little issues.

    Better yet: switch to something else if VB6 is too tough for you. We won't hold you back.

  18. #18
    Lively Member
    Join Date
    Mar 09
    Posts
    127

    Re: VB6 Webbrowser - Compatibility with Internet Explorer 8

    Quote Originally Posted by dilettante View Post
    I've never had any Windows 7 issues with VB6 either. Of course you're ALWAYS required to run it elevated, that was spelled out in the early Dev Info released when Vista came out.

    I swear some people just go looking for trouble or something. Just keep up with changes and you shouldn't have so many little issues.

    Better yet: switch to something else if VB6 is too tough for you. We won't hold you back.
    Well, we've got it running without needing it elevated.. We tried with elevated, but that was too cumbersome (no user-based network mappings and some other problems).. The only problem we have is with sourcesafe when loading a project and when it has new files, but we fixed that mostly with our own add-in.. there are also ways to get it working correctly by tampering the windows compatibilitysettings, but we didn't trust that so we just stopped using that.

  19. #19
    Frenzied Member
    Join Date
    Aug 11
    Location
    B.C., Canada
    Posts
    1,946

    Re: VB6 Webbrowser - Compatibility with Internet Explorer 8

    I did have registry access errors when i first tried vb6 on my win7 laptop but i then run it as administrator and since then i do not have any kind of errors or problems but i think its always good to talk about any issues in case it does happen to someone else

  20. #20
    Hyperactive Member
    Join Date
    Oct 06
    Posts
    388

    Re: VB6 Webbrowser - Compatibility with Internet Explorer 8

    Thanks to all who have contributed in a positive way to this thread. It has provoked discussion and hopefully might prove of use to future forum users searching for Webbrowser/Internet 7/8 compatibility issues.

    Different of us appear to have encountered different (or no) problems. It is apparent that there is "some sort" of a problem here, but we have not exactly nailed it down.

    The above suggested registry changes did it OK for me. I can also confirm that when I tested .exe of a VB6 program incorporating the Webbrowser on a WinXP-Sp3 machine having no VB6 and no registry tweeks it ran without problems.

    The Webbrowser / Internet Explorer 7/8 incompatibility problem, if it exists, appears only to manifest itself on a computer which is running VB6 in its design mode.

    I will mark the thread as RESOLVED, but of course any further contributions would still be welcomed.

    camoore

    Wales, UK
    Last edited by camoore; Oct 16th, 2012 at 05:14 PM.

Posting Permissions

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