9.0
143
Description
Display the dialog associated with dialogvar. The initial values of the dialog fields are provided by dialogvar. If the
OK button
or any push button is pressed then the fields in dialog are copied to the dialogvar. The Dialog( ) function
returns a value indicating which button was pressed. (See the result table below.)
Parameter Description
dlgvar This variable that holds the values of the fields in a dialog. Use field to access
individual fields in a dialog variable.
default This numeric value indicates which button is the default button.
(
Pressin
g
the Ente
r
key on a non-button pushes the default button.) Use -2 to indicate that there is no
default button. Other
p
ossible values are shown the result table below. If this value
is omitted then the first PushButton, OKButton or CancelButton is the default button.
Result Description
-1 OK button was pressed.
0 Cancel button was pressed.
>0 Nth push button was pressed.
See Also: Begin Dialog, Dim As UserDialog.
Example
Sub Main
Begin Dialog UserDialog
200,120
Text
10,10,180,15,"Please push the OK button"
OKButton
80,90,40,20
End
Dialog
Dim
dlg As UserDialog
Dialog dlg ' show dialog (wait for ok)
End Sub
Dim definition
[lower To] upper
Array dimension. If lower
is omitted then the lower bound is zero or one depending on the Option Base setting.
(The lower bound of an array element in a Type
definition is not affected by the Option Base setting.) upper must
be at least as big as lower
.
Dim A(100 To 200) '101 values
Note: For ReDim
the lower and upper may be any valid expression. Otherwise, lower and upper must be constant
expressions.
Dim Definition
Syntax
Dim [WithEvents] name[type][([dim[, ...]])][As [New] type][, ...]
Group
Declaration










