By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 804 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

use NET framwork in VB6?

P: n/a
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
Aug 12 '07 #1
Share this Question
Share on Google+
11 Replies


P: n/a
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.
--
Terry
"hushtech" wrote:
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
Aug 12 '07 #2

P: n/a
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
"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:7E**********************************@microsof t.com...
>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

Aug 12 '07 #3

P: n/a
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
"Terry" wrote:
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.
--
Terry
"hushtech" wrote:
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
Aug 13 '07 #4

P: n/a
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

"Michel Posseth [MCP]" wrote:
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
"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:7E**********************************@microsof t.com...
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


Aug 13 '07 #5

P: n/a
here is an example i once posted in this newsgroup

http://groups.google.com/group/micro...996d74d250974e

Michel

"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:07**********************************@microsof t.com...
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

"Michel Posseth [MCP]" wrote:
>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
"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:7E**********************************@microso ft.com...
>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



Aug 13 '07 #6

P: n/a
Hi Jack,
In addition to what Michel has provided, go into VS 2005 help, and using
the 'index' type in 'COM Interop'.
--
Terry
"hushtech" wrote:
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
"Terry" wrote:
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.
--
Terry
"hushtech" wrote:
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
Aug 13 '07 #7

P: n/a
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.

--
cheers,
RL
"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:uC**************@TK2MSFTNGP06.phx.gbl...
here is an example i once posted in this newsgroup

http://groups.google.com/group/micro...996d74d250974e

Michel

"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:07**********************************@microsof t.com...
>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

"Michel Posseth [MCP]" wrote:
>>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
"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:7E**********************************@micros oft.com...
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


Aug 13 '07 #8

P: n/a

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


"Egghead" <robertlo@NO_SHAW.CAschreef in bericht
news:%2****************@TK2MSFTNGP05.phx.gbl...
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.

--
cheers,
RL
"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:uC**************@TK2MSFTNGP06.phx.gbl...
>here is an example i once posted in this newsgroup

http://groups.google.com/group/micro...996d74d250974e

Michel

"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:07**********************************@microso ft.com...
>>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

"Michel Posseth [MCP]" wrote:

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
"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:7E**********************************@micro soft.com...
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



Aug 13 '07 #9

P: n/a
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...t-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.
Aug 13 '07 #10

P: n/a
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

"Michel Posseth [MCP]" wrote:
here is an example i once posted in this newsgroup

http://groups.google.com/group/micro...996d74d250974e

Michel

"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:07**********************************@microsof t.com...
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

"Michel Posseth [MCP]" wrote:
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
"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:7E**********************************@microsof t.com...
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


Aug 13 '07 #11

P: n/a
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
"Egghead" wrote:
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.

--
cheers,
RL
"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:uC**************@TK2MSFTNGP06.phx.gbl...
here is an example i once posted in this newsgroup

http://groups.google.com/group/micro...996d74d250974e

Michel

"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:07**********************************@microsof t.com...
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

"Michel Posseth [MCP]" wrote:

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
"hushtech" <hu******@discussions.microsoft.comschreef in bericht
news:7E**********************************@microso ft.com...
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


Aug 13 '07 #12

This discussion thread is closed

Replies have been disabled for this discussion.