Ensuring my dialog is always opened on top of every other open form/screen/window

I’ve been developing a general purpose dialog replacement substitute for the LO BASE runtime routine MSGBOX - see this forum entry - It has more buttons up to 4, each with their own macro controlled text labels , ability to have the background & icon under macro control and has a scrollable text area

However, when testing I have noticed that sometimes, when I have other forms belonging to my application open it does not always open on top of everything else. This is important because, as you probably know, dialogs are by default monadic and have to be responded to before anything else. If they are hidden behind other forms/windows then it can appear to the user that his/her system has frozen - this is NOT A GOOD THING.

My question is: how can I ensure that my dialog always opens on top?

Dialogs are set to modal or modeless by design/usage. For example using Find/Replace in a Writer doc brings up a modeless dialog. When a dialog is modal, the calling object cannot be accessed until the dialog is closed. Your dialog is modal to the form calling it (tested with a dummy form). However this does not stop anyone from opening another form which is not a parent to the dialog and hiding the dialog beneath. The same is true if you start another application. The opened dialog is not a child of this other application.
I don’t know of any way to make this dialog a child of the operating system - this is apparently what you are looking for.

Thank you for this explanation, it has reset my expectation of how dialogs behave.