Open a Form as a Dialog Box



The Open a Form as a Dialog Box action provides a alternative approach to displaying a dialog. Rather than creating an Xdialog or message box, you select a predefined form to open as a modal dialog box. The form you select to open as a dialog must contain buttons. Using the Script Genie, you define actions to take place according which buttons are selected by the user.


  1. Select the form you will be using from the Form Name list.

  2. Enter a name for the dialog box in the Dialog Box Name field. The name should be unique so that when referenced, Alpha Anywhere will not confuse it with any other objects.

  3. Select each button in the If the user clicks on list and make a selection in the Then... field to specify what happens when you press the button. You can attach a previously defined script, or have it do nothing.

    • "Play a Script". Use this option to attach a script to a button. When you select this option, you'll be prompted to select the script you wish to attach. A drop-down box appears, listing available scripts. Pressing the button runs the script.

    • "Do Nothing - just set a Flag Variable to .T.". Use this option if you do not want the button to play a script. When the button is selected, the message box will close, and set a Flag Variable.

    In both cases, Alpha Anywhere automatically creates and names Flag Variables. In this case: "QuickCustomer_BUTTON2_button", "QuickCustomer_BUTTON2_button", etc.

See Also