BeginDialog( DialogID,  xPos, yPos, Width,  Height, “Caption” )

Begins a dialog definition.

Parameters:

DialogID

Variant

Variant to receive the dialog identifier. Used in subsequent dialog statements

xPos

Integer

Vertical position of the Dialog. If omitted, the dialog will be centered

yPos

Integer

Horizontal position of the Dialog. If omitted, dialog will be centered

Width

Integer

The width of the Dialog

Height

Integer

The height of the Dialog

Caption

Variant

The title to be displayed in the Dialog caption

 

Remarks:

BeginDialog...EndDialog define a dialog template.

Use the Dialog statement to display the dialog.

A minimum of a Cancel or OK button must be defined to allow closing the dialog.

Use the BlueZone Dialog Editor to create the dialog and automatically generate the dialog code for use in Script Host scripts.

The following example demonstrates a dialog using all of the available dialog elements.  Refer to this example when referencing the individual dialog element statements to see how the code examples work in a complete dialog.

Example:

BeginDialog Dialog1, 0, 0, 201, 203, "Dialog"

  ButtonGroup ButtonPressed

OkButton 130, 10, 50, 15

CancelButton 130, 30, 50, 15

    PushButton 130, 50, 50, 15, "Mybutton1", mybutton1

    PushButton 130, 70, 50, 15, "MyButton2", mybutton2

CheckBox 45, 180, 35, 15, "Check 2", Check2

CheckBox 5, 180, 35, 15, "Check 1", Check1

ComboBox 5, 15, 75, 50, "Item 1"+chr(9)+"Item 2"+chr(9)+"Item 3", Combo1

Text 15, 5, 40, 10, "ComboBox"

  ListBox 115, 115, 80, 55, "Item 1"+chr(9)+"Item 2"+chr(9)+"Item 3", List1

  Text 140, 100, 40, 10, "ListBox"

StaticComboBox 5, 115, 75, 55, "Item 1"+chr(9)+"Item 2"+chr(9)+"Item 3", Combo2

Text 10, 100, 50, 10, "Static Combo"

  DropListBox 5, 45, 75, 50, "Item 1"+chr(9)+"Item 2"+chr(9)+"Item 3", List3

  Text 10, 35, 45, 10, "DropListBox"

  OptionGroup RadioGroup1

    RadioButton 120, 180, 35, 15, "Radio1", Radio1

    RadioButton 155, 180, 35, 15, "Radio2", Radio2

  EditBox 5, 75, 75, 15, Edit1

  Text 20, 65, 50, 10, "EditBox"

  EndDialog

Dialog Dialog1