473,395 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Using a .NET assembly in a VB6 application

Hi!

Is it possible to use a .NET assembly in a VB6 application? We have an old
VB application to which we'd like to add a new module, no communication is
needed to the old app. Is it possible to develop it using VB.NET and then
use/call it in the VB6 application.

Thnaks in advance!
/Henke
Nov 20 '05 #1
10 1123
stu
Hi,

Yes you can create a com+ component and then just call it from vb6

Stu
Nov 20 '05 #2
"Henke" <he********@hotmail.com> schrieb
Is it possible to use a .NET assembly in a VB6 application? We have
an old VB application to which we'd like to add a new module, no
communication is needed to the old app. Is it possible to develop it
using VB.NET and then use/call it in the VB6 application.

http://msdn.microsoft.com/library/en...nentstocom.asp
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
That looks nice, calling methods and returng values from a .NET class looks
like it would work.
I'm not good at COM+ so sorry for asking:
Can my COM+ objects have a user interface?

/Henke

"Armin Zingler" <az*******@freenet.de> skrev i meddelandet
news:ev**************@TK2MSFTNGP11.phx.gbl...
"Henke" <he********@hotmail.com> schrieb
Is it possible to use a .NET assembly in a VB6 application? We have
an old VB application to which we'd like to add a new module, no
communication is needed to the old app. Is it possible to develop it
using VB.NET and then use/call it in the VB6 application.

http://msdn.microsoft.com/library/en...nentstocom.asp

--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4
I gotta question about this, and it may sound incredibly dumb but I don't
understand how the interop works. Or at least confused.

Given that its managed code that simply exposes a com interface, would it be
correct in saying that if you built an Active X control it would require the
CLR?

Or can you build an ActiveX Control with .NET?
"Armin Zingler" <az*******@freenet.de> wrote in message
news:ev**************@TK2MSFTNGP11.phx.gbl...
"Henke" <he********@hotmail.com> schrieb
Is it possible to use a .NET assembly in a VB6 application? We have
an old VB application to which we'd like to add a new module, no
communication is needed to the old app. Is it possible to develop it
using VB.NET and then use/call it in the VB6 application.

http://msdn.microsoft.com/library/en...nentstocom.asp

--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5
Hi,

Use regasm.exe
http://msdn.microsoft.com/library/de...lregasmexe.asp

Ken
-------------------
"Henke" <he********@hotmail.com> wrote in message
news:eF**************@TK2MSFTNGP11.phx.gbl...
Hi!

Is it possible to use a .NET assembly in a VB6 application? We have an old
VB application to which we'd like to add a new module, no communication is
needed to the old app. Is it possible to develop it using VB.NET and then
use/call it in the VB6 application.

Thnaks in advance!
/Henke

Nov 20 '05 #6
"Henke" <he********@hotmail.com> schrieb
That looks nice, calling methods and returng values from a .NET class
looks like it would work.
I'm not good at COM+ so sorry for asking:
Can my COM+ objects have a user interface?


See my reply to CJ. Or short: I'm almost sure that they can't. You might
pass a window handle to the COMponent and use it to paint on it, but that's
all I can say.
--
Armin

Nov 20 '05 #7
"CJ Taylor" <no****@blowgoats.com> schrieb
I gotta question about this, and it may sound incredibly dumb but I
don't understand how the interop works. Or at least confused.

Given that its managed code that simply exposes a com interface,
would it be correct in saying that if you built an Active X control
it would require the CLR?
yes, it would, but...
Or can you build an ActiveX Control with .NET?


....no, you can't. At least there is no "built-in" way. I'm not sure but I
think a link has already been posted that could take you to a "work-around".
I didn't follow it, so everybody else can say more about it.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #8
Fair enough, I appreicate the reply. I had somene ask me abuot this and I
didn't know how to give the answer since I have yet to develop and ActiveX
application since leaving VB6.

My question regarding the CLR was not to sound dumb, but I was reading some
articles on MSDN that was talking about bringing the managed classes into a
single type library for the activex control, which made me think that maybe
it creates its own interop between all of them, I don't know, never played
with it.

And regarding the ActiveX control in .NET, I had seen a few posts about it,
read some articles but was unsure on how it worked, which is why I posted.
I greatly appreciate your insight on this though.

Thanks,
CJ
"Armin Zingler" <az*******@freenet.de> wrote in message
news:eK**************@tk2msftngp13.phx.gbl...
"CJ Taylor" <no****@blowgoats.com> schrieb
I gotta question about this, and it may sound incredibly dumb but I
don't understand how the interop works. Or at least confused.

Given that its managed code that simply exposes a com interface,
would it be correct in saying that if you built an Active X control
it would require the CLR?
yes, it would, but...
Or can you build an ActiveX Control with .NET?


...no, you can't. At least there is no "built-in" way. I'm not sure but I
think a link has already been posted that could take you to a

"work-around". I didn't follow it, so everybody else can say more about it.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #9
How should the component be used in VB.
I add a reference, and then tries to add it through Components->Browse. But
when I add the dll-file it says not an ActiveX component. What am I missing
here?

Thanks!
/Henke

"Ken Tucker [MVP]" <vb***@bellsouth.net> skrev i meddelandet
news:Oo**************@TK2MSFTNGP09.phx.gbl...
Hi,

Use regasm.exe
http://msdn.microsoft.com/library/de...lregasmexe.asp
Ken
-------------------
"Henke" <he********@hotmail.com> wrote in message
news:eF**************@TK2MSFTNGP11.phx.gbl...
Hi!

Is it possible to use a .NET assembly in a VB6 application? We have an old VB application to which we'd like to add a new module, no communication is needed to the old app. Is it possible to develop it using VB.NET and then use/call it in the VB6 application.

Thnaks in advance!
/Henke


Nov 20 '05 #10
"Henke" <he********@hotmail.com> schrieb
How should the component be used in VB.
I add a reference, and then tries to add it through
Components->Browse. But when I add the dll-file it says not an
ActiveX component. What am I missing here?


After regasm.exe, the component must be available in Project -> References.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Tom Dacon | last post by:
If you're not putting assemblies in the GAC, but are referencing shared code with copylocal=true into the projects that use them, is there any value to signing the assemblies? In the environment...
14
by: pmud | last post by:
Hi, I need to use an Excel Sheet in ASP.NET application so that the users can enter (copy, paste ) large number of rows in this Excel Sheet. Also, Whatever the USER ENETRS needs to go to the...
8
by: Subra Mallampalli | last post by:
Hi, I am trying to use <runtime> section within the web.config file. However, the contents of the <runtime> section seem to be ignored. What am i missing here? Is <runtime> section not used by...
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
3
by: Michael Hoehne | last post by:
Hi, I'm currently facing a problem with a mixed environment using .NET 1.1 and ..NET 2.0 web services. We have a client application (the "client", system 1) running on .NET 2.0/WinXP, calling...
1
by: Daniel Knöpfel | last post by:
Hello Im triying to create an installer using ClickOnce and visual studio 2005. This works fine on my computer, but as soon as i start the created installer on another pc I get the following...
3
by: Siv | last post by:
Hi, A little while ago I wrote a small program that allowed the user to view products from a database. The database holds the details of the products which can be viewed via a form and...
0
by: Bill Nguyen | last post by:
I ran into this error using ClickOne to deploy a .NET 2.0 app. CrystalReports for .NET 2.0 is included in the delployment. The error indicates that an incorrect version of CrystalReports.Engine DLL...
4
by: Tony Johansson | last post by:
Hello! I have read some info on the WWW about GAC It says the following. "If you want to use an assembly from the GAC, you should drop your assemblies into a local folder, and then add a...
3
by: shobhitguptait | last post by:
How to Run C#.NET Windows App on N/W with centralized DB using SQL SERVER 2000 Hello All...i m really grate full to c such a website where developers try to help people like us who face problems...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.