Pause for another Window?

I’d like to pause the activity in one window while the user interacts with another window, and then return control to the calling window when done.

For example:

(in Window1 method) 'hide controls from Phase1 InstructionsWindow.ShowThis(somestring) 'show controls for Phase2

Sub Instructions.ShowThis(str as string) 'display str InstructionsGoButton.visible = true me.ShowModal

Sub InstructionsGoButton.Action Instructions.close
When they press the GoButton, I’d like to return control to Window1. But I don’t want the Phase2 controls to appear until Instructions are closed.

Should I return some variable (from InstructionsGoButton.Action? from Instructions.ShowThis?) that lets Window1 know when to proceed? Or do I need to use cycles with a busywaiting checking some global variable? I feel like I’m missing a straightforward solution.

Thanks!

ShowModalWithin?

Seems like you need to show a modal window

@Markus Winter - ShowModalWithin makes it slide down from top (on MacOS), which I find annoying to watch :wink:

@Julio Debroy - Yes! Thanks for the simple solution!

The window type had been “1 - Movable Modal”, but when I changed it to “2 - Modal Dialog” it works.
The calling function is still “me.ShowModal” (not ShowModalWithin)

Thanks everyone!

ShowModalWithin is specific to that window and stops that window from continuing

ShowModal is specific to the app and stops all windows from progressing until the modal one is closed