: Hi, I am creating the form dinamically and I would like to change the name of the form before it is created, so I can access it by findWindow when I need...
: But I am getting errors whe nI close the main form...
: any ideas?
That's possible. First you need to remove the form from the "Auto-create forms" (Project Options). Then you need to edit the project source file, so that it creates the form without any owners. After that you can set the Name property to whatever you like. Finally you can insert that form into the Application by calling InsertComponent().
This however will not change the classname, since that cannot be changed during runtime. Also FindWindow() doesn't search for the Name property but for the Caption of the form.
As for the errors, those can happen when other programs are still using the window handle, after the form (and thereby its handle) has been destroyed.