Solved

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

Posted on 2014-10-15
6
315 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.Net creating Contact in Outlook 1 94
Assign a value in Excel V-Basic 3 36
Stop Git from being my repository 1 47
Help with Report Viewer in VS2013 6 31
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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…

737 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