DialogWindow.EndDialog Method (Typed) | |
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.21
Syntax VIRTUAL METHOD EndDialog(
iResult AS LONG
) AS LONG
public virtual int EndDialog(
[DefaultParameterValueAttribute(0, 0)] int iResult
)
Request Example
View SourceParameters
- iResult
- Type: Long
The result code that should be posted. The default is 0.
Return Value
Type:
LongExamples 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:
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