Thursday 21 December 2017

Auto create forms and data modules does not quite work

I've recently moved to Delphi 10.1 Berlin Update 2 from using XE and XE5. One thing that caught me out was that I forgot to turn off the 'Auto create forms and data modules' in the 'Form Designer' options. This setting means that when you add a form or data module to a project it gets auto-created at run-time.



The problem with this setting is that it does not fully work. I have a project where I do not want to auto create any forms or data modules, I have a class that is responsible for doing the initial creation of the required forms and objects, but if I add a form or data module to the project it always gets added to the auto create list in the project. This option assumes you want just one form in the list, once one is added it does not add anymore.

This problem could occur in all versions of XE and the now the more recent versions (DX), I plan to check this with XE and will hopefully soon be updating to the latest version of Delphi.

5 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  2. Problems like this are usually caused by manual changes to the .dpr file.

    ReplyDelete
  3. I have such option disabled as well and my forms/datamodules don't get auto-created. The only problem I have is that I must always remove the global var that the IDE generates

    ReplyDelete
  4. I can confirm this is also an issue with Delphi XE. So I would imagine that this happens with all versions between XE and Berlin Update 2. I can also confirm that I have not manually changed any dpr files.

    ReplyDelete