Solved

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

Posted on 2014-10-15
6
281 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now