Window.ShowModal
From Xojo Documentation
Method
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.
For Drawer or Sheet windows, you should use ShowModalWithin to specify the parent window to which the Drawer or Sheet is attached. Using just ShowModal without specifying the parent may result in Drawers and Sheets being attached to a window you do not expect.