We are upgrading a Delphi 5 application to Delphi XE7. The application has a number of MDIChild (FormStyle fsMDIChild) forms which open with WindowState wsNormal. When I open one of these forms, and close it again, my main menu (TMainMenu) on the main form (FormStyle fsMDIForm) aligns itself to the right and never goes back again. If I resize the MDIChild form before closing it (eg. click on "Normal" or "Minimize" icon), this does not happen.
This does not happen with the Delphi 5 version, so I assume something gets handled differently with XE 7.
Anyone else experienced this before? If so, how did you fix it?
UPDATE:
I have successfully replicated this problem:
- Create a new VCL app
- Make main form (MainForm) formStyle MDIForm
- Create MainMenu for MainForm with menu items
- Create second form (ChildForm)
- Make ChildForm formStyle MDIChild
- Create MainMenu for ChildForm with menu items
- IMPORTANT (THIS IS WHAT BREAKS IT): Select for ChildForm BorderIcons only biSystemMenu and biMaximise
- Create button on MainForm which creates and shows ChildForm
- Run application
- Click button
- Maximise ChildForm
- Close ChildForm (Has to be maximised otherwise malfunction does not occur)
- Observe that MainForm's menu is now right-aligned with an unclickable 'Minimise' icon on the left If biMinimise is added to ChildForm's BorderIcons, the problem disappears.
I'm pretty sure this is a bug. Correct me if I'm wrong.
Thanks J