Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Can MSVS 6 leverage .net (more precisely C# forms)?

Can MSVS 6 leverage .net (more precisely C# forms)?

Scheduled Pinned Locked Moved C / C++ / MFC
csharpquestioncollaboration
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    e
    wrote on last edited by
    #1

    I maintain a very mature product (over ten years old) that was written in MSVS 6. My team is in the process of giving the app a new look and feel. We decided to try to convert the project to .net to leverage the GUI elements; but had too many issues during this process and forfeit the idea. This leads to my questions: 1.Could an application that is compiled under MSVS 6 use Win Forms? 2.This is more of a secondary question to number 1). Could controls be written in C# then; built into an assembly; be used by an app compiled in MSVS 6? 3.If you answer yes to either question; is there any documentation? Thank you:), -e -- modified at 8:33 Saturday 22nd April, 2006

    T W M 3 Replies Last reply
    0
    • E e

      I maintain a very mature product (over ten years old) that was written in MSVS 6. My team is in the process of giving the app a new look and feel. We decided to try to convert the project to .net to leverage the GUI elements; but had too many issues during this process and forfeit the idea. This leads to my questions: 1.Could an application that is compiled under MSVS 6 use Win Forms? 2.This is more of a secondary question to number 1). Could controls be written in C# then; built into an assembly; be used by an app compiled in MSVS 6? 3.If you answer yes to either question; is there any documentation? Thank you:), -e -- modified at 8:33 Saturday 22nd April, 2006

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      -e wrote:

      1.Could an application that is compiled under MSVS 6 use Win Forms?

      no

      -e wrote:

      2.Could controls be written in C# then; built into an assembly; be used by an app compiled in MSVS 6?

      no

      -e wrote:

      3.If you answer yes to either question; is there any documentation?

      sorry :-D in fact, you can't because VC6 doen't know gthe .NET framework at all. so you can't neither use the .NET SDK, nor use some assembly compiled for .NET. tell me however, why don't you just upgrade the code to VC++2003 (MFC or Win32) without wanting targetting for .NET ?

      E 1 Reply Last reply
      0
      • E e

        I maintain a very mature product (over ten years old) that was written in MSVS 6. My team is in the process of giving the app a new look and feel. We decided to try to convert the project to .net to leverage the GUI elements; but had too many issues during this process and forfeit the idea. This leads to my questions: 1.Could an application that is compiled under MSVS 6 use Win Forms? 2.This is more of a secondary question to number 1). Could controls be written in C# then; built into an assembly; be used by an app compiled in MSVS 6? 3.If you answer yes to either question; is there any documentation? Thank you:), -e -- modified at 8:33 Saturday 22nd April, 2006

        W Offline
        W Offline
        Waldermort
        wrote on last edited by
        #3

        MSVS is actually a studio and not specificaly intended for only C++. You are able to compile most languages using MSVS including C#, J#, C++, C. Maybe you meant to say MSVC? It is possible to call C# code from C++. Usually the C# would be in the form of a dll, and you would need to manually register the type library. Also the .NET runtimes would need to be installed on the client machine. The process of doing this is a little complicated, but there are some articles here on CP which demonstrate it.

        E 1 Reply Last reply
        0
        • T toxcct

          -e wrote:

          1.Could an application that is compiled under MSVS 6 use Win Forms?

          no

          -e wrote:

          2.Could controls be written in C# then; built into an assembly; be used by an app compiled in MSVS 6?

          no

          -e wrote:

          3.If you answer yes to either question; is there any documentation?

          sorry :-D in fact, you can't because VC6 doen't know gthe .NET framework at all. so you can't neither use the .NET SDK, nor use some assembly compiled for .NET. tell me however, why don't you just upgrade the code to VC++2003 (MFC or Win32) without wanting targetting for .NET ?

          E Offline
          E Offline
          e
          wrote on last edited by
          #4

          Thanks for the input. To answer your question I had assigned developers to try to convert the application to VC++ 2003. Since the applications is over ten years old it has seen its share of GUI toolkits and some of these toolkits are not converting to the new platform. So one of my goals is to slowly move the application to the new platform. I am trying to make the application co-exist between VC ++ 6 (old code) and VC++ (maybe .net) 2003 or greater (new code). Since I don't have the option to compile the application greater than VC++ 6. Thanks, -e

          1 Reply Last reply
          0
          • W Waldermort

            MSVS is actually a studio and not specificaly intended for only C++. You are able to compile most languages using MSVS including C#, J#, C++, C. Maybe you meant to say MSVC? It is possible to call C# code from C++. Usually the C# would be in the form of a dll, and you would need to manually register the type library. Also the .NET runtimes would need to be installed on the client machine. The process of doing this is a little complicated, but there are some articles here on CP which demonstrate it.

            E Offline
            E Offline
            e
            wrote on last edited by
            #5

            Thanks for replying, I should of been more specific with the development language. The existing application is coded using VC++ 6 (MFC). At the moment I can't covert (promote) the existing code to a greater platform than VC++ 6 (for various reasons). So I am looking for a way to have new development be written in VC++ 2003(or higher) or C# and try to co-exist with the existing code. So I guess what I'm looking for is an application that is compiled with VC++ (MFC) 6 to have mixed code; the existing code to use MFC 6 components (like dialogs etc..) and the new code to use C#, VC++ 7 code (like Win-Forms etc...). Thanks, -e P.S. My goal is to eventually move the application to the newer platform (in baby steps).

            1 Reply Last reply
            0
            • E e

              I maintain a very mature product (over ten years old) that was written in MSVS 6. My team is in the process of giving the app a new look and feel. We decided to try to convert the project to .net to leverage the GUI elements; but had too many issues during this process and forfeit the idea. This leads to my questions: 1.Could an application that is compiled under MSVS 6 use Win Forms? 2.This is more of a secondary question to number 1). Could controls be written in C# then; built into an assembly; be used by an app compiled in MSVS 6? 3.If you answer yes to either question; is there any documentation? Thank you:), -e -- modified at 8:33 Saturday 22nd April, 2006

              M Offline
              M Offline
              Michael P Butler
              wrote on last edited by
              #6

              I've done this via Com Callable Wrappers (CCW) around .NET components. This[^] article is a good starting point. Michael CP Blog [^] Development Blog [^]

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups