Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting Delphi DFM (Form) File into HTML 1

Status
Not open for further replies.

djjd47130

Programmer
Nov 1, 2010
480
0
0
US
Not like it's anything new, but as a unique challenge, I'm building a converter to translate a delphi DFM file into an HTML document. I already got it working, but now I have a lot of filling in the little bits and pieces. It's all based on CSS, and I have a class which stores delphi values and converts it all to a single style string. I'm also working on implementing actual style sheets, by using a drop-in component in the form that will be converted, linking each control to a pre-defined stylesheet.

It's pretty much like my own little version of .NET. It can help a lot when it comes to converting delphi applications to web applications. Now the code is another story...


JD Solutions
 
Always good to have something to do that's interesting and a challenge. Here I've been trying to finish a program I've been working on for a year or more (odd for me, actually). Bunch of different modules to get right. Been using OOP a little more than I'm used to. Don't know if that's a benefit or not (it really balloons the EXE size in some cases), but the project has definitely been useful proof to me of the benefit of modularizing functions in code.

Hoping I can get that done and then polish up and document the modules so they can be a little more useful than what I wanted them for.

It is not possible for anyone to acknowledge truth when their salary depends on them not doing it.
 
Project took a bit of a shift - I'm building a rather code converter. This requires the use of a parser, which is a topic all of its own. In the end, this application will assist with converting from one language to another. I'm structuring the backbone core of any language, then mapping links between those characteristics and grammar definitions for different languages. In the end, code from one language will be loaded into this object structure, then reverse engineered into any other language. Of course this will come with many flaws in the differences of these languages. For example, knowing what certain object types to substitute, like mapping a Delphi TPanel with an HTML Div. It obviously won't do the whole job for you, but will at least take a big chunk out of the work. Any code which is not recognized will be commented.

JD Solutions
 
Here's some screenshots of what I've done so far... The form I'm testing with is from an old project, and has tons of controls on it.. Perfect for testing with.

DFMText.png


DFMObjects.png


HTMLText.png


HTMLView.png



JD Solutions
 
Well done!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top