I use TDE.
I've got MainForm with FormStyle = fsMDIForm. And the second form, base one: TBaseForm with FormStyle = dsMDIChild. From TBaseForm I inherit next forms and they behave right. (all closing things are done in TBaseForm). Also in TBaseForm WindowState = wsMaximized.
I inherit from TBaseForm a form called TBaseDialog - for modal forms. Main changes are:
- FormStyle = fsNormal
- WindowState = wsNormal
- Visible = false
Forms inheroted from TBaseDialog I have to show (via ShowModal) on event like click of button located on form of MDIChild (inherited from TBaseForm). In this dialog forms user enters additional data.
The negative effect is that while opening forms inherited from TBaseDialog all open forms base inherited from TBaseForm are restored to their original sizes. And the dialog is drawn over them.
I debugged VCL and noticed that, inspite that in ObjectInspector I set FormStyle = fsNormal, while the constructor TBaseDialog.Create is executed VCL use FormStyle = fsMDIChild inherited from TBaseForm. To test it more I created TBaseDialog2 not inherited from TBaseForm with FormStyle
= fsNormal and everything was ok.
How should I create dialog forms when I'd like to have them inherited from TBaseForm?