Delphi 2 CSharp conversion

G

Guest

Hi,

I am evaluating various alternatives of converting Delphi (Ver 4.0) screens
to C# screens. Are there any tools available for such conversion? if yes how
much conversion do they achieve? The number of screens to be converted are
huge, we are aiming minimum regression impact.

What could be the best approach?

Currently the option of Delphi.Net is ruled out.

Thanks in advance,
Sanjay Kedare
 
J

Jani Järvinen [MVP]

Sanjay,
I am evaluating various alternatives of converting Delphi (Ver 4.0)
screens
to C# screens. Are there any tools available for such conversion? if yes
how
much conversion do they achieve?

Unfortunately I'm not aware of any such tools, but Google might be more
knowledgeable. Anyway, should such a tool exist, I wouldn't expect too much
from it.

Yes, an automatic conversion is possible to some extent, but in real life
the situation probably is different. If your Delphi VCL forms would not
contain any code (i.e. they would be just "screens", which is highly
unlikely), then such tools might work, but even in that case only for simple
components like buttons and text boxes.

Although many VCL components map almost one-to-one to C# WinForms components
(thanks to the common architect behind both of the products), there are
things you just cannot convert automatically. Take databases for example --
the whole database architecture in Delphi and C# (ADO.NET) is different. So
converting a TTable to a DataSet mechanically just wouldn't make sense.
What could be the best approach?

I'm afraid there isn't a simple solution to this problem. I suggest you try
automated tools first (if you can find such), but there is still manual work
that needs to be done. As you say the number of forms you have to convert is
huge, I believe the amount work you need to do is also very large.

Hope this helps nonetheless. All the best with your quest!

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
(e-mail address removed)
http://www.saunalahti.fi/janij/
 
F

Floyd Burger

It's a manual approach. Open the old project in Delphi, and the new project
in VS, then find the compatible components from the VS toolbox to drop on
the new forms. If you have a lot of forms, you could probably automate it a
bit if your Delphi DFMs are text. The C# form resource file is XML, so you
could build the XML from the DFM.
 
J

Jani Järvinen [MVP]

Peter,
A lot of Borland's stuff is semi backwards
compatible, so if you can get a copy of Delphi 8,
which supports C# and Delphi, you may be able
to finesse the "conversion".

It is true that Delphi 8 had support for both C# and Delphi, but that just
won't help. Having support for two languages in the product doesn't mean
that Delphi 8 could convert the project from one language to another.

Besides, Delphi 8 was a bad version in my opinion. Okay, it did the job, but
Delphi 2005 (the latest version presently) does the same work and more much
better. Plus, it is a lot easier to get than Delphi 8 which is obsolete by
now.

If the easiest conversion path would be an option for Sanjay, s/he would get
Delphi 2005, and convert the VCL project to a VCL.NET one. But if C# is the
way to go, then we are out of luck.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
(e-mail address removed)
http://www.saunalahti.fi/janij/
 
G

Guest

Thank you all for your inputs, they have given me a good headstart to look
out for a possible option.

Regards,
Sanjay Kedare
 
C

Chad Z. Hower aka Kudzu

"=?Utf-8?B?U2FuamF5IEtlZGFyZQ==?="
I am evaluating various alternatives of converting Delphi (Ver 4.0)
screens to C# screens. Are there any tools available for such
conversion? if yes how much conversion do they achieve? The number of

There is a Delphi to C# convertor, but I dont think it does forms.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Develop ASP.NET applications easier and in less time:
http://www.atozed.com/IntraWeb/
 
P

Peter N Roth

Hi Jani -

I see at the moment 12 copies of D8 available on ebay
from $125 up, and 9 copies of D2005 from $134.

The point is, if one can compile existing [Delphi] code
then the conversion to yet another language is unnecessary.
That's what i meant by 'finesse'.
--
Grace + Peace,
Peter N Roth
Engineering Objects International
http://engineeringobjects.com
Home of Matrix.NET
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top