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. The Lounge
  3. how hard to rewrite a legacy software from C++ to C# in WinForm?

how hard to rewrite a legacy software from C++ to C# in WinForm?

Scheduled Pinned Locked Moved The Lounge
csharpc++question
26 Posts 18 Posters 5 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.
  • S Southmountain

    I have a legacy software to draw very sophisticated charts. but I only need a small piece of these charts. I want to re-write the code charting this small piece of charts. How hard it is to do this? any experience to share?

    diligent hands rule....

    O Offline
    O Offline
    obeobe
    wrote on last edited by
    #21

    I bet ChatGPT can do it.

    1 Reply Last reply
    0
    • S Southmountain

      I have a legacy software to draw very sophisticated charts. but I only need a small piece of these charts. I want to re-write the code charting this small piece of charts. How hard it is to do this? any experience to share?

      diligent hands rule....

      T Offline
      T Offline
      Thornik
      wrote on last edited by
      #22

      Nothing hard. After C++ you'll write C# code like a song.

      1 Reply Last reply
      0
      • R RedDk

        It's easy. Start a new project in the target language of your choice. Copy the bare minimum from the source language, paste it in the new language target husk, and attempt to compile. You'll get tons of errors and warnings. Pick through them and eliminate them one-by-one. Obviously there's a lot of personal experience in "attempting" to do anything using a compiler and a linker. Done this, have I. Learned much have I.

        J Offline
        J Offline
        jschell
        wrote on last edited by
        #23

        At least to me the OP suggested that they want to use WinForms and that existing code does not use that. So that is a complete rewrite at least for that part.

        1 Reply Last reply
        0
        • S Southmountain

          I have a legacy software to draw very sophisticated charts. but I only need a small piece of these charts. I want to re-write the code charting this small piece of charts. How hard it is to do this? any experience to share?

          diligent hands rule....

          J Offline
          J Offline
          jochance
          wrote on last edited by
          #24

          There are good charting controls available off the shelf for WPF, maybe for winforms but just go WPF. If those just won't do, you probably want to look for "using GDI+ from WPF" if you're looking to draw your own charts. If you're really wanting to visualize data in interesting ways, it might not be insane to look into using Unity. Custom rendering with GDI+ is.... hard to get a positive return on investment unless you're a company that sells components for WinForm/WPF.

          1 Reply Last reply
          0
          • N Nelek

            obermd wrote:

            To this day I'll occasionally use On Error Resume Next

            as long as you put something in between... :rolleyes: ;P :laugh:

            M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

            O Offline
            O Offline
            obermd
            wrote on last edited by
            #25

            On Error Resume Next is really useful for short clean up routines where the code would look like this

            try {statement1} catch {}
            try {statement2} catch {}
            ...

            N 1 Reply Last reply
            0
            • O obermd

              On Error Resume Next is really useful for short clean up routines where the code would look like this

              try {statement1} catch {}
              try {statement2} catch {}
              ...

              N Offline
              N Offline
              Nelek
              wrote on last edited by
              #26

              what (empty catch blocks) actually is something I do not like, have already lost some precious time tracking down things done by people thinking it is not needed.

              M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

              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