Modal Dialog with show modal showing up behind parent window (again)

I’ve seen other closed threads about this, but it’s happening (sometimes) and it’s a disaster.

I have a window open, then I determine I need some feedback from the user so I pop a modal dialog and the app appears to hang. My users have to know that a dialog was opening or they’d never think to look if something is blocking from behind the window they expect to be in.

Using the same code on Mac, and it never happens.

I’m really hoping that there is a reasonable fix for this without having to implement a bunch of platform checking and strange hacks.

Has anyone figured out the pattern and solution?

I think @JulianS reported this bug. The issue affects the IDE…

Indeed to modify the z-Order of a MessageDialog is more intricate than doing that with a window, since Xojo does not provide the handle for that or MessageBox.

A simple workaround would be to use a floating window to emulate the dialog.