Solved

Recovering form definition...

Posted on 2000-04-27
3
142 Views
Last Modified: 2010-04-04
Does anyone know if it's possible to recover the definition of a form from an executable or .dcu? I've managed to destroy my dfm and I really don't want to have to start trying to remember how the controls were linked etc...

Any Ideas?

Cheers,

Adam...

P.S. If anyone knows of a way to do this I'd be willing to up the points if it works...
0
Comment
Question by:AJFleming
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
simonet earned 100 total points
ID: 2755377
If you have the executable, it's pretty easy. The only catch is: the application MUST NOT have been compressed by an EXE compressor (like ASPack or Compress).

Here's what to do:
1) Download Resource Explorer 1.5, from my site:
http://www.bhnet.com.br/~simonet/resexp.htm

2) Unzip resexp15.zip to a directory where you want it to be installed (there's no installer)

3) Run Resource Explorer 1.5 and open the executable from which you want to extract the form definition(s).

Delphi Form Definitions are stored as resources of type RC_DATA with the name of the form. All you have to do is to click on the appropriate resource type (RT_RCDATA) and select the form.

The text displayed is the same as the "View as Text" option of the Delphi IDE when working in the form Designer.

Copy the displayed text, open Delphi, Select New Form, right-click the new form, select "View as Text", paste the text copied from Resource Explorer and save the file in a new directory, different from the one where the .PAS file is.

Now simply move the newly created .DFM file to where the existing .PAS file is and you're all set.

>If anyone knows of a way to do this I'd be willing to up the points if it works...

IT's up to you! The method described above surely works!

Yours,

Alex
0
 
LVL 1

Author Comment

by:AJFleming
ID: 2800082
Adjusted points from 50 to 100
0
 
LVL 1

Author Comment

by:AJFleming
ID: 2800083
Sorry about the delay - just found the mail notifying me  of the response to this question...

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now