Results 1 to 17 of 17

Thread: C# and VB6

Hybrid View

  1. #1
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: C# and VB6

    Quote 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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157

    Re: C# and VB6

    Quote Originally Posted by RobDog888
    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
    This is exactly what I am looking for. Thank You!
    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157

    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

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157

    Re: C# and VB6

    Anyone?
    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

  5. #5
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: C# and VB6

    Quote 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 Attached Images  

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157

    Re: C# and VB6

    Quote 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

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157

    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

  8. #8

  9. #9
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: C# and VB6

    Quote Originally Posted by RobDog888
    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
    That link was available in one of those (in the second to be exact) that I posted like half a day earlier.

  10. #10
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: C# and VB6

    Quote 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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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
  •  



Click Here to Expand Forum to Full Width