Solved

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

Posted on 2014-10-15
6
300 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
  • 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Call windows 10 virtual keyboard from windows forms app 2 52
get column names from table in vb.net 8 51
Help with opening combobox using VB.NET. 3 26
Code enhancement 4 22
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

830 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