Dan Mackey On ColdFusion Development

ColdFusion, Java, .NET, AJAX, DHTML development and general programming. Daniel is owner and Administrator of CFTagStore.com and works for an Application Development Company in Ireland called Digital Crew. His interests cover all areas of programming in multiple languages with a particular interest in Internet Technologies.

All Articles tagged : Visual Basic 6
2006-10-24 15:50:00.0

Visual Basic 6 And Internet Explorer 7

I am currently moving over to C# .NET for all my desktop programming but I have some legacy apps written in Visual Basic 6 that use the WebBrowser Control extensively. Plus, sometimes you dont want the overhead of .NET 2.0 just to knock out a quick app so Visual Basic 6.0 works perfectly in some scenarios.

Since I installed Internet Explorer 7 all references to the library that holds the Web Browser control are broken. I see lots of people around the net are having the same issues and there is a simple solution.

All you have to do is click Project and then Components, click Browse... and locate shdocvw.dll in the System 32 directory. This will restore the IDE back to referencing the correct .dll for the WebBrowser control and all other projects will load fine from then on.

UPDATE - Saturday 28th October 2006

I ran into a slight issue that took a while to figure out.
On the development machine, the VB6 IDE threw a strange error after the Navigate2 method is called. This error was something like "Runtime Exception -1 (FFFFFFF)". I couldnt figure out what it was because when I compiled the app and ran it outside VB IDE I didnt get the error. After a while I remembered that when I installed IE7 (I did this twice to see what would change on my machine) it reset some basic security settings. One of these is "Allow scripting of the WebBrowser Control". This was the culprit. If I checked this on, the IDE didnt throw the error.

Another thing to stress is that the end user of your application will have no problems if your VB6 App uses the WebBrowser control. Even if you have IE6 and they have IE7, your app is compatible.

As Tim mentions in the comments section, there are too many people knocking IE7 and having petty flame wars when in actual fact the impact of IE7 on legacy apps is minimal with the right information. Overall I am extremely happy with IE7 and am beginning to appreciate the effort Microsoft have put into it.

Add to your del.icio.us    DIGG This!    Technorati Cosmos Link    Post to Reddit    Add to your Furl    Add to Blinklist
Comments [53] - Leave a comment