Floating Window will not show after Main Document Window is minimised

Don’t mix both ways. I personally would recommend my approach because you will not create a window if you try to close it and it did not exist before.

Guys, thank you all. This now works perfectly!!! :slight_smile: As per Ulrich’s methods… Yippeeee . . . . . . . . .

Random tests, opening the floating window, closing, minimising the main, maximising, opening again, etc. etc. - no problem and it all works as expected.

So thanks you Greg, Jeff and Ulrich for your time and effort.

I have to say that I’m surprised that this sort of thing, being a child of the main window, doesn’t just work anyway without the extra code. Surely others have been frustrated by this. But I can tell you that I’m damm well glad to have a solution and will remember (copy the same code :)) for future applications. It’s an important piece of knowledge.

I’m at the point in my app that I’ll be releasing a beta version shortly, and although it will be for free, there was no way I could release it with that bug.

So Ulrich, If you could summarise, or maybe I could? - not sure how to go about this, but the solution as in “this answers my question” needs to be dealt with.

Really glad to read that, Steve!
I don’t mind if you summarize it. The main point is simply that instantiating a window as a property will always create one which is unnecessary if you just want to make sure it is closed.
The only case where I would recommend such an approach is when you have something like a MainWindow that will always exist as long as the app is running. (But that’s my personal preference and you can use different approaches. In many cases they will create the necessity for even more code to cope with different situations.)

One might have the idea that enumerating the windows could cause some slowdown. I can assure you you will almost not be able to measure the suspected overhead.

Well Ulrich, I have to admit that I don’t understand why it works. I’m just happy that it does.

If you’ve ever seen the movie The Matrix (I think the 2nd one - reloaded) then there is a scene where Neo and Councillor Hamman are on a high balcony (in Zion) overlooking the water and air purification systems/machines. Councillor Hamman says that he doesn’t really know what the machines do, but makes the point that he understands the importance of why they are there.

I’m not saying that that is my approach to programming, but in certain circumstances , with some parts, I don’t know or have the brains or time to work out the intricate bits

Thank you so much for sticking with my problem and solving it.

Cheers, +1000 points. :slight_smile: