Click or drag to resize

DialogWindow.EndDialog Method (Typed)

X#
Remove this dialog window from view (passing control back to the routine which created the dialog window) and post a result code indicating how it was closed.

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VOGUIClasses (in XSharp.VOGUIClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD EndDialog(
	 iResult AS LONG
) AS LONG
Request Example View Source

Parameters

iResult
Type: Long
The result code that should be posted. The default is 0.

Return Value

Type: Long
Examples
Tip Tip
This result code can then be passed to the routine that called the dialog window if the routine invokes DialogWindow:Result.
The following example instructs EndDialog() to return 0 if the Cancel push button is pressed and 1 if OK is pressed:
X#
1METHOD ButtonClick(oEvent) CLASS MyDialogWindow
2IF oEvent:nControlID == ID_OK
3SELF:EndDialog(1)
4ENDIF
5IF oEvent:nControlID == ID_CANCEL
6SELF:EndDialog(0)
7ENDIF
See Also