How do I do this in Xojo

Hi, I’m migrating from VB6 to Xojo web and I would like to implement a decision modal form. In VB6 I use:

Sub WaitForDecision() FormOptions.Show vbModal 'Pause execution Beep 'Executed only after FormOptions is unloaded End Sub

I Think there are no Modal forms that pauses execution in Xojo web. How can I do this in Xojo?

MessageDialog

OR

MsgBox

You just need to create new modal-type window and open it with showModal:

myWindow.showModal

Not all window types can be modal (a document-type window, for instance, cannot be modal).

Once you get the right type of window set (the options are on the window’s Inspector pane), you can add controls such as textfields and checkboxes, etc. and the user can fill out the fields before closing the window.

Important: you do need to make your own way for the user to close the window! That means at minimum you need to add two pushbuttons, one for cancel and one for save. Within the cancel one you’d add code such as self.close to close the window. Within the save button you’d need to save whatever information the user put into the window (store it in a global variable, perhaps) and then close the window the same way.

If you don’t do this, the window will remain open, blocking all other activity in your app, and the user won’t be able to do anything else!

Thanks, but, My question is abaout Xojo Web apps.

You need toook at the webDialog in that case.

MsgBox is available for web, that will pause execution until OK is pressed.
For beep I found this post from Michel with some threads: https://forum.xojo.com/conversation/post/210658

You have to create a WebDialog and implement the Dismissed Event using a method which is applied via AddHandler. The dialog.show does not stop code execution in a web app. So you have to implement further code in the dismissed event.