use NET framwork in VB6?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?aHVzaHRlY2g=?=

    #1

    use NET framwork in VB6?

    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
  • =?Utf-8?B?VGVycnk=?=

    #2
    RE: use NET framwork in VB6?

    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

    Comment

    • Michel Posseth  [MCP]

      #3
      Re: use NET framwork in VB6?

      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" <hushtech@discu ssions.microsof t.comschreef in bericht
      news:7E51B6D6-4269-4E6F-B0D3-244C36DDA21B@mi crosoft.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

      Comment

      • =?Utf-8?B?aHVzaHRlY2g=?=

        #4
        RE: use NET framwork in VB6?

        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

        Comment

        • =?Utf-8?B?aHVzaHRlY2g=?=

          #5
          Re: use NET framwork in VB6?

          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" <hushtech@discu ssions.microsof t.comschreef in bericht
          news:7E51B6D6-4269-4E6F-B0D3-244C36DDA21B@mi crosoft.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
          >
          >
          >

          Comment

          • Michel Posseth  [MCP]

            #6
            Re: use NET framwork in VB6?

            here is an example i once posted in this newsgroup



            Michel

            "hushtech" <hushtech@discu ssions.microsof t.comschreef in bericht
            news:07C78FB8-866D-4877-861F-6D679C10AD0E@mi crosoft.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" <hushtech@discu ssions.microsof t.comschreef in bericht
            >news:7E51B6D 6-4269-4E6F-B0D3-244C36DDA21B@mi crosoft.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
            >>
            >>
            >>

            Comment

            • =?Utf-8?B?VGVycnk=?=

              #7
              RE: use NET framwork in VB6?

              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

              Comment

              • Egghead

                #8
                Re: use NET framwork in VB6?

                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]" <MSDN@posseth.c omwrote in message
                news:uCcv6kW3HH A.2312@TK2MSFTN GP06.phx.gbl...
                here is an example i once posted in this newsgroup
                >

                >
                Michel
                >
                "hushtech" <hushtech@discu ssions.microsof t.comschreef in bericht
                news:07C78FB8-866D-4877-861F-6D679C10AD0E@mi crosoft.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" <hushtech@discu ssions.microsof t.comschreef in bericht
                >>news:7E51B6 D6-4269-4E6F-B0D3-244C36DDA21B@mi crosoft.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
                >>>
                >>>
                >>>
                >
                >

                Comment

                • Michel Posseth  [MCP]

                  #9
                  Re: use NET framwork in VB6?


                  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_SH AW.CAschreef in bericht
                  news:%23fvD5jb3 HHA.5164@TK2MSF TNGP05.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]" <MSDN@posseth.c omwrote in message
                  news:uCcv6kW3HH A.2312@TK2MSFTN GP06.phx.gbl...
                  >here is an example i once posted in this newsgroup
                  >>
                  >http://groups.google.com/group/micro...996d74d250974e
                  >>
                  >Michel
                  >>
                  >"hushtech" <hushtech@discu ssions.microsof t.comschreef in bericht
                  >news:07C78FB 8-866D-4877-861F-6D679C10AD0E@mi crosoft.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" <hushtech@discu ssions.microsof t.comschreef in bericht
                  >>>news:7E51B6D 6-4269-4E6F-B0D3-244C36DDA21B@mi crosoft.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
                  >>accomplishe d.
                  >>Sorry, converting this app to NET is not possible for business
                  >>reasons.
                  >>thanks,
                  >>jack
                  >>>>
                  >>>>
                  >>>>
                  >>
                  >>
                  >
                  >

                  Comment

                  • Dick Grier

                    #10
                    Re: use NET framwork in VB6?

                    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.


                    Comment

                    • =?Utf-8?B?aHVzaHRlY2g=?=

                      #11
                      Re: use NET framwork in VB6?

                      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
                      >

                      >
                      Michel
                      >
                      "hushtech" <hushtech@discu ssions.microsof t.comschreef in bericht
                      news:07C78FB8-866D-4877-861F-6D679C10AD0E@mi crosoft.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" <hushtech@discu ssions.microsof t.comschreef in bericht
                      news:7E51B6D6-4269-4E6F-B0D3-244C36DDA21B@mi crosoft.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
                      >
                      >
                      >
                      >
                      >
                      >

                      Comment

                      • =?Utf-8?B?aHVzaHRlY2g=?=

                        #12
                        Re: use NET framwork in VB6?

                        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]" <MSDN@posseth.c omwrote in message
                        news:uCcv6kW3HH A.2312@TK2MSFTN GP06.phx.gbl...
                        here is an example i once posted in this newsgroup



                        Michel

                        "hushtech" <hushtech@discu ssions.microsof t.comschreef in bericht
                        news:07C78FB8-866D-4877-861F-6D679C10AD0E@mi crosoft.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" <hushtech@discu ssions.microsof t.comschreef in bericht
                        >news:7E51B6D 6-4269-4E6F-B0D3-244C36DDA21B@mi crosoft.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
                        >>
                        >>
                        >>
                        >
                        >
                        >

                        Comment

                        Working...