This is not a question but rather a TIP how to deal with problem i encountered yesterday and if somebody else has this rather "strange" error from nowhere then you at least could try it.
Just wanted to give something back to this community.
So my Windows was getting slow. I reformatted the HDD (just one partition where the Windows lives), installed new copy of it and also installed new copy of fresh Delphi 7 (Personal version in my case).
Installed all the components i always use (TB2K, TBX, RXLib, etc, all free ones).
Tried to open my map editor project and Delphi greeted me with message: "RLINK32: Error opening file "C:\Program Files\Borland\Delphi7\Projects\..\Main.DFM"
I thought whats the problem, it just worked on old Windows. Few minutes ago.
Ok, i started to look what Google has to say about this. And at one page of some discussion i found a tip something like: "some incompatible or not installed VCL component or image may cause that.."
I tried to convert my .dfm to text format and binary, many many times with "DFM Editor from MiTeC" and later with "convert.exe", didn't help. I thought that it got corrupted somehow or something. But no..
Then i started to look into text format .dfm file more carefully. Looked at the "binary" images i had there.
Lot's of them.
Then i noticed hmm, ImageList: "object ImageList1: TTBXImageList"
And below that: "PngDIB = {"
And then i kinda got it. That PngDIB...
Delphi 7 doesnt support PNGs by default, that could be the problem.
So i just removed everything between "PngDIB = {" and closing "}"
All of the images. So i removed the image binary data, saved form and opened the project. Everything compiled and worked.
My Delphi even started to show the main form again. I had to manually open it each time i wanted to see it.
In my case i copy / pasted the ImageList's from TBX demo form to my editor form, because it had already nice images in it.
So what could be the problem is that either the images are or went corrupted somehow either the TTBXImageList is buggy. Especially with PNGs.
Sometimes it helps to change the "{$R *.DFM}" in your main unit to {$R Your_Main_Form.DFM} format.
But not always. Delphi will not show the form like this later, if you press F12 (which i use alot, because its so quick). It will show the text version of form and that's it.
So lesson i have learned is that, use .bmp as much as possible as images for your menus and toolbars.
Bmp's can also get corrupted but they are supported by default in Delphi 7 and earlier versions of it. And should cause much less trouble.
Hopefully this information is useful to someone.
Bookmarks