9.0

146
DlgCount Function
Syntax
DlgCount()
Group
Dialog Function
Description
Return the number of dialog items in the dialog.
This instruction/function must be called directly or indirectly from a dialogfunc
.
Example
Sub Main
Begin Dialog
UserDialog 200,120,.DialogFunc
Text
10,10,180,15,"Please push the OK button"
TextBox
10,40,180,15,.Text
OKButton
30,90,60,20
End
Dialog
Dim
dlg As UserDialog
Dialog
dlg
End
Sub
C:\ABCTemp\vbs\Function_Definition.htm
Function
DialogFunc%(DlgItem$, Action%, SuppValue%)
Debug
.Print "Action=";Action%
Select
Case Action%
Case 1 ' Dialog
box initialization
Beep
Debug
.Print "DlgCount=";DlgCount() ' 3
End
Select
End
Function
DlgEnd Instruction
Syntax
DlgEnd ReturnCode
Group
Dialog Function
Description
Set the return code for the Dialog Function and close the user dialog.
This instruction/function must be called directly or indirectly from a dialogfunc
.
ReturnCode
Return this numeric value.