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.
Parameter Description
ReturnCode Return this numeric value.
Example:
Sub Main
Begin DialogUserDialog 210,120,.DialogFunc
Text 10,10,190,15,"Please push the Close button"
OKButton 30,90,60,20
check box 120,90,60,20,"&Close",.check box1
EndDialog
Dim dlg As UserDialog
Debug.PrintDialog(dlg)
EndSub
Function DialogFunc%(DlgItem$, Action%, SuppValue%)
Debug.Print "Action=";Action%
Select Case Action%
Case 1 ' Dialog box initialization
Beep
Case 2 ' Value changing or button pressed
Select Case DlgItem$
Case "check box1"
DlgEnd 1000
EndSelect
EndSelect
EndFunction