Search code examples
delphipropertiesheightclientdfm

Delphi: 'Property ClientHeight does Not Exist'


My Delphi program builds and compiles fine, however as soon as it is run in the debug mode, I get the following error;

Property ClientHeight does Not Exist

After looking through all of the .DFM file sources, in every form the code is there which is;

ClientHeight = 111

I'm not understanding where I go wrong here?


Solution

  • Your forms would have been saved with a newer version of Delphi. Unfortunately you will need to open each form in the IDE and save it again to clear the newer properties. There is a tool that can help you called DFMCheck (http://andy.jgknet.de/blog/ide-tools/dfmcheck/). This is an add on that will go through all of your forms and tell you about any problems with the forms that will only show up at runtime.

    The reason why you are seeing the problem is this. Delphi saves the forms with all of the properties. It uses streaming to load the forms at runtime. When it tries to load a form with properties that don't exist then you will get an error like this as the streaming system is trying to set a property on a component when the property doesn't exist.