Lots here for me to digest, thanks for all this.
I do understand the role of lfm files, and I never edit them, hardly ever look at them.
I have, as suggested, tried "Check LFM file in editor", and it seems ok, giving the message "Classes and properties exist. Values were not checked".
I hve been using a prpogram structire that creates files dynamically for some time with no problems. Forms are desighed in Desoigner, taken out of auto-create, form variable deleted. Then when the form is needed iut it created by Tabc.Create(Main). The form may, at some other point in the app, get deleted.
Note I have been using TabcForm.Create(Main) and not CreateForm. What is the difference, apart from syntax and first CreatreForm window becoming main form?
I have other forms, apart from the one giving this problem, that get created in exactly the same way (99% same actual code, obviously calling a different formclass.Create). These other forms behave the way I want, with no problems.
There was one thing I did regarding the LFM file for the problem form that may be relevant. This is a big app, with many different forms. For each form there is the PAS and LFM files, plus some application PAS files concerned with application calculations, drawing a chart, and arranging controls on the form. I decided to put all the files for the problem form in a sub-folder. So I created a sub-folder, then moved (Windows Explorer) the files to the sub-folder. I then removed the files from the app (since the app would still be expecting them in the main folder) and added them (from the sub-folder) to the app. I cannot be sure if this exactly coincided with the appearance of the problem, but it was around that time. I have since reversed this to put all the files back in the main folder for the app. I would have thought that *.lfm in the forms PAS file would pick up the LFM as long as it was in the same folder, but maybe there is more to it?
I shall review all the advice so far, await repliesd regarding CreateForm vs Create and sub-folders. Then my plan is to rebuild the problem form, under another name, copying across the controls. My thinking is that this will give me a "clean" LFM file.