use NET framwork in VB6?

G

Guest

I have a VB6 app that uses SQLServer2005 connection to store/retrieve data. I
want (I think) to get access to a(some) Server events. Seems this is doable
if
I can instantiate the SQLConnector Class and use some of it's methods in my
VB6 app. My question: can I use the NET framwork from within a VB6 app? If
yes, then where can I get info (book,tutorial,etc.) on how this is
accomplished.
Sorry, converting this app to NET is not possible for business reasons.
thanks,
jack
 
G

Guest

You can write a Vb.net program that 'wraps' the framework functionality that
you want and exposes this functionality through 'COM' to your VB6 programs.
 
M

Michel Posseth [MCP]

COM is your friend in this situation

Just write all the event logic in a COM capable dll , ( do not forget to
create a public sub new )


regards

Michel
 
G

Guest

Thanks Terry,
I've just installed VB 2005 so I can write a vb.net app (hopefully) with the
functionality I'm looking for. I infer from your comment "and exposes this
functionality through 'COM' to your VB6 programs" that there is some obvious
method for doing this in .net. I've heard of people doing this so there must
be a 'recipe'. If you can point to a tutorial that explains what goes on
I'd really
appreciate it.
regards, jack
 
G

Guest

thanks Michel,
when you say "a COM capable dll" you mean one that 'wraps' the .NET stuff?
Like I mentioned to Terry, I've some inkling about doing this but never having
seen and instance I'll have to ferret around for some information that
explains
what needs to be done between the .NET and the COM. I've no problem with
COM dlls etc.
regards, jack
 
G

Guest

Hi Jack,
In addition to what Michel has provided, go into VS 2005 help, and using
the 'index' type in 'COM Interop'.
 
E

Egghead

Hi here,

Since he is using VB.Net, he shall use the COM template at the VB.NET. It
saves a lot of trouble, such as GUID.
 
M

Michel Posseth [MCP]

Well i prefer to do everything myself :)
saves a lot of trouble, such as GUID.

i also create my own guids ( and keep them ) so i can use early binding fore
every service release of the object without anny need of recompiling the
clients
 
D

Dick Grier

Hi,

Actually, it is "fairly straight foward." Take a look here:

Tutorials: http://msdn2.microsoft.com/en-us/vbasic/bb466226.aspx

http://msdn2.microsoft.com/en-us/vbasic/aa701259.aspx

http://blogs.msdn.com/vbteam/archive/2007/06/06/slide-deck-for-interop-toolkit-webcast.aspx

http://msdn2.microsoft.com/en-us/vbrun/default.aspx



--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
G

Guest

Thanks Michel,
I'll study your example and see if I can make a COM dll from the .NET code.
Since
I've never even looked at NET code it should be 'fun'.
regards, jack
 
G

Guest

Egghead,
you suggest using the "COM template at the VB.NET". Where/what is the
"VB.NET"?
is it a discussion group, or a web site? I'm new to all NET places for
information.
Please give me directions to look at the "COM template".
regards, jack
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top