DesktopWindow.ShowModal
From Xojo Documentation
Method
DesktopWindow.ShowModal(parentWindow As DesktopWindow = Nil)
New in 2021r3
Supported for all project types and targets.
New in 2021r3
Supported for all project types and targets.
Displays the window and causes the current method to stop executing until the window closes or becomes invisible.
Notes
If the window is a Document window it is shown as a normal Document window. It becomes the frontmost window but it is not modal. You must use a modal window Frame type to force the window into a modal state.
If a parentWindow is passed, the window being displayed will be modal to the parent window on macOS.