質問

I have to maintain an Delphi 7 application. I've received the source code of this app, and when I try to open .DFM file or .DCU file by Notepad++, some of them display normaly with the source code, but some of them display incorrect with strange characters. How can I recover these file I will appreciate your help

役に立ちましたか?

解決

For the .DFM, you can either:

  • Open the file in the IDE, right-click the form, and check Text DFM and then save it, or
  • From a command prompt in the folder where the .dfm is located, run convert <dfmfile.dfm>, which will convert it to text format with the same name. (Convert.exe is located in your $(DELPHI)\Bin folder, where $(DELPHI) refers to the root folder of your Delphi 7 installation).

The .dcu is compiled (binary) code, so to view it you need to open the .pas file with the same name (eg., if you have Unit1.dcu, you view it's source by opening Unit1.pas). There's no way to view the .dcu as text, because it isn't text.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top