Jul 11th, 2007, 12:31 AM
#1
Re: C# and VB6
Originally Posted by
Hell-Lord
This is possible. After all C# or .NET for that matter was created for inter-language communication. Not primarily but it is a good factor
And rob i think it is the reverse way
VB forms don't implement COM i
think .
You can create a .NET dll and expose it via COM so it can be used in VB 6. Also, .NET controls can be used with that utility for use in VB 6.
http://support.microsoft.com/default...b;en-us;817248
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Jul 11th, 2007, 02:49 AM
#2
Thread Starter
Frenzied Member
I'll Be Back!
T-1000
Microsoft .Net 2005
Microsoft Visual Basic 6
Prefer using API
Jul 11th, 2007, 03:34 AM
#3
Thread Starter
Frenzied Member
Re: C# and VB6
Actually, I have a question on this.
I successfully got the example to work. However, it seems the dll file that gets produce is not the regular type that you can use Regsvr32.exe. How do I transport this to a machine that does not have .net and only VB6?
Also, it is interesting that you can only do this example with VB.Net and not C#.net. There is simply no COM Class for C#.
Thank you
Last edited by Liquid Metal; Jul 11th, 2007 at 03:40 AM .
I'll Be Back!
T-1000
Microsoft .Net 2005
Microsoft Visual Basic 6
Prefer using API
Jul 11th, 2007, 08:36 PM
#4
Thread Starter
Frenzied Member
I'll Be Back!
T-1000
Microsoft .Net 2005
Microsoft Visual Basic 6
Prefer using API
Jul 11th, 2007, 08:59 PM
#5
Re: C# and VB6
Originally Posted by
Liquid Metal
Also, it is interesting that you can only do this example with VB.Net and not C#.net. There is simply no COM Class for C#.
Thank you
You need to create a Class Library project as suggested in links I posted for you.
Also, here is an image.
Attached Images
Jul 12th, 2007, 04:21 AM
#6
Thread Starter
Frenzied Member
Re: C# and VB6
Originally Posted by
RhinoBull
You need to create a Class Library project as suggested in links I posted for you.
Also, here is an image.
I did.
Got it to work with VB.Net but try to do it with C# and you will notice there is no COM class object for C#.
Just do the example but use C# instead.
I'll Be Back!
T-1000
Microsoft .Net 2005
Microsoft Visual Basic 6
Prefer using API
Jul 18th, 2007, 03:41 AM
#7
Thread Starter
Frenzied Member
Re: C# and VB6
Did you get a chance to check out what I mention Rhino?
I'll Be Back!
T-1000
Microsoft .Net 2005
Microsoft Visual Basic 6
Prefer using API
Jul 18th, 2007, 08:33 AM
#8
Re: C# and VB6
No, sorry - I was sort of away for awhile. Will give it the try if I scramble some time today, tomorrow... Can't promise tho...
Jul 11th, 2007, 08:49 PM
#9
Re: C# and VB6
Originally Posted by
RobDog888
That link was available in one of those (in the second to be exact) that I posted like half a day earlier.
Last edited by RhinoBull; Jul 11th, 2007 at 08:53 PM .
Jul 12th, 2007, 01:41 AM
#10
Re: C# and VB6
Originally Posted by
RhinoBull
That link was available in one of those (in the second to be exact) that I posted like half a day earlier.
Ah, so it is. Should have pointed it out.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width