How to use WebBrowser from VB.NET (2005) in VB6?

Posted on 2014-10-15
Medium Priority
Last Modified: 2014-11-02
I would like to use WebBrowser from VB.NET (2005) in VB6. Is it possible, and how? Is there maybe some kind of ActiveX wrapper around this object, so I could use it straightforward in VB6?
Question by:npaun
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
LVL 16

Expert Comment

by:Rose Babu
ID: 40381913
Hi npaun,

have a look on the below URL to add browser control in vb6 application


Hope this can help you.

Author Comment

ID: 40381927
@Rose Babu
As far I as understand, that post is about using VB6 WebBrowser ActiveX control inside a VB6 project, which I'm quite familiar of. The problem is that VB6  WebBrowser ActiveX is old and full of bugs. Hence, I wish to use the VB.NET WebBrowser Net component, but inside my VB6 project, if possible, and that is a completely different thing....

Accepted Solution

Valliappan AN earned 2000 total points
ID: 40381981
I think you'd have 2 options.

1) Use "Microsoft InteropForms Toolkit 2.1" and then use the VB.NET forms/user controls in your VB6 code.
( http://www.microsoft.com/en-us/download/details.aspx?id=3264 )
For examples on this search for 'Microsoft InteropForms Toolkit examples' and you would get the same.

2) Option 2 would be to :
- create a user control in vb.net
- set the 'Register for COM interop' in debug/release modes.
- Set [Assembly:ComVisible(true)] in Assemblyinfo.cs
- register the dll with regasm.exe utility (regasm.exe Assembly.dll) and then use in vb6.
- use the custom control in vb6

refer: http://www.codeproject.com/Articles/19015/Using-NET-Controls-in-VB

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

LVL 16

Expert Comment

by:Rose Babu
ID: 40382167
Hi npaun,

I got your point now. And you may or may not be interested on the below links. So just take a look and it may give any idea.



Author Comment

ID: 40388940
ok, thanks.
Do you maybe know what is the situation with deployment in the case 1)? i.e. when making an VB6 installer, what are the additional components I would have to include in my setup package? And, does all the necessary components can be simply included in the VB6 (or third party) installer, or the user would need to implement something manually or semi manually, e.g to run the InteropFormToolsInstaller.msi at his own?

Expert Comment

by:Valliappan AN
ID: 40389666
Hi npaun,

Not sure if you can do this with VB6 installer, but you may need to check with the third party tool(s) that you will be using for install, you may include them with some scripts such as Powershell or any other, should be available in such setup installers. Or write a custom script to install the same.

I think this should include Dot Net Framework obviously and the MS Interop Forms library installer if you want to use that.

Check these links on .NET Framework automated install as a separate package:

(.NET Framework Deployment Guide for Developers)

(.NET Framework Deployment Guide for Administrators)


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month11 days, 21 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question