I recently upgraded to Delphi 10.4.2 (coming from 10.4.1) and am now experiencing some weird behavior when using a QuickReport preview.
On the main form I use a MainMenu with some submenus. When the code in the submenu item results in showing a QuickReport preview, the main form disappears after closing this preview window.
Debugging led me to this new piece of code in the Vcl.Forms.pas unit. The procedure TFormStyleHook.TMainMenuBarStyleHook.ProcessMenuLoop now ends like this:
if FDispatchMessage then
DispatchMessage(Msg)
else
if Msg.Message = CM_RELEASE then
FFormHook.Form.Release;
The else tag was not there in previous Delphi versions. After the QuickReport preview window closes, FFormHook.Form points to the MainForm, which gets released. So the application is still running, but the mainform is gone and there is no application icon in the taskbar.
My application uses styles. When I call the QuickReport from a MainMenu item at top level, this behavior does not occur.
Does anybody else experience this same kind of problem?