471,599 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,599 software developers and data experts.

Delphi 2 CSharp conversion

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
Nov 17 '05 #1
7 6367
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
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/
Nov 17 '05 #2
Delphi 4 is by now an ancient version.

But... 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".

http://www.borland.com/us/products/delphi/index.html

--
Grace + Peace,
Peter N Roth
Engineering Objects International
http://engineeringobjects.com
Home of Matrix.NET
"Jani Järvinen [MVP]" <ja***@removethis.dystopia.fi> wrote in message
news:Og**************@tk2msftngp13.phx.gbl...
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
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/

Nov 17 '05 #3
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.

--
Floyd

"Sanjay Kedare" <Sa**********@discussions.microsoft.com> wrote in message
news:7A**********************************@microsof t.com...
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

Nov 17 '05 #4
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
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/
Nov 17 '05 #5
Thank you all for your inputs, they have given me a good headstart to look
out for a possible option.

Regards,
Sanjay Kedare

"Jani Järvinen [MVP]" wrote:
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
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/

Nov 17 '05 #6
"=?Utf-8?B?U2FuamF5IEtlZGFyZQ==?="
<Sa**********@discussions.microsoft.com> wrote in
news:7A**********************************@microsof t.com:
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/
Nov 17 '05 #7
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
"Jani Järvinen [MVP]" <ja***@removethis.dystopia.fi> wrote in message
news:eZ**************@tk2msftngp13.phx.gbl...
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
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/

Nov 17 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by ann | last post: by
10 posts views Thread by Arda Han | last post: by
1 post views Thread by Piotr Nabielec | last post: by
9 posts views Thread by Gclinton | last post: by
21 posts views Thread by matko | last post: by
2 posts views Thread by Mel Weaver | last post: by
reply views Thread by Alberto Salvati | last post: by
2 posts views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.