I have come across an issue with Delphi and Windows 10. I have an old app done in Delphi 2007 and although the application appears to work fine in Windows 10, if you create a modal dialog from your main form and then close down, the dialod but not main form, then hover your mouse over the task preview, you see the main form, but you also see the dialog windows as well even though it was already closed. Clicking on the preview brings the window to be the fore, and the dialog disappears again. Other than that, there does not appear to be any issue, it just looks very unprofessional, especially if you have a lot of dialogs within an app. To see this you have to hover over the taskbar icon, this works fine, but then move your mouse into the thumbnail windows. It is only at this point you see the dialog you previously had open, along with other rectangular windows outlines.
I did not have the MainFormOnTaskbar := true set (My app was originally ported from D2006) but I have set it before the creation of the main form in the .dpr file and it has absolutely no impact at all. However if I move this line to be run immediately after the main form creation, it looks like it works. I read online that this line must be run before the main form, so looking for some advise please.
This issue seems to persist across different Delphi versions, and I am also seeing it in 10.3 Rio. I can understand D2007 as it pre-dates Win10 but how come this get through QC testing in 10.3 Rio and has not largely been reported elsewhere.
I found another work-around. If I put Params.WndParent:=application.Handle; into the dialog, this seems to fix this issue in D2007 at least. Is this safe to use in this mannor, not sure why it works as the handle is the same handle it would have if I had never put this code in, but it does seem to work.
Would appreciate some advise from anyone who can help.
Thanks
David.