Solved

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

Posted on 2014-10-15
6
321 Views
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?
0
Comment
Question by:npaun
[X]
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
6 Comments
 
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

http://stackoverflow.com/questions/3218648/how-do-i-open-a-webpage-in-vb6

Hope this can help you.
0
 

Author Comment

by:npaun
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....
0
 
LVL 9

Accepted Solution

by:
Valliappan AN earned 500 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:
refer: http://www.codeproject.com/Articles/19015/Using-NET-Controls-in-VB

HTH.
0
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!

 
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.

 http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=74350&lngWId=1

http://www.freevbcode.com/ShowCode.asp?ID=7585
0
 

Author Comment

by:npaun
ID: 40388940
@valli_an
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?
0
 
LVL 9

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:

http://msdn.microsoft.com/library/ee942965(v=VS.100).aspx#command_line_options
(.NET Framework Deployment Guide for Developers)

http://msdn.microsoft.com/en-us/library/ee390831(v=vs.110).aspx
(.NET Framework Deployment Guide for Administrators)

 
HTH.
0

Featured Post

Independent Software Vendors: 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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

691 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