I couldn’t replicate your issues but personally I wouldn’t open modal message boxes/windows during an Open event of a window as it can cause all sorts of race/messaging issues.
I think I only have the issue on Mac and it has been several years.
About using that in open - I forgot about racing. I forgot for the example.
About the example. It will work. If I put the same code in my app then it won’t.
I should not have to put in
Showmodalwithin(self) to make it work. It is also diffificult passing a window to a module.
Ok, so your example should work (and it works), but the same code will not work on your app.
If you can’t make an example (that won’t work and mimic your issues) for Xojo to take a look you may need to send your app (privately) for them to look at it.
If you open a modal dialog in the OPEN event of a window, it could cause that event (or at least the Activate to fire again, as you removed focus from the window to show the dialog)… and if done during the CLOSE event, the window may not truly close (it might hide, but stay instantiated)