Form - ModalResult Property

ModalResult tells how a modal form was closed

Member of Form (PRIM_FORM)

Data Type - Enumeration

Details

The ModalResult property provides feedback as to how a modal form was closed.
 
This property corresponds to the Push Button ModalResult property.
 
Use the ModalResult property when you display a form using the ShowModalForm method to find out how the user closed the form.
 
When the form closes, the form's ModalResult property indicates the button (or another action) that was used to close it.
 
At design time you can assign a ModalResult to each push button on the form by choosing one of the values Abort, Cancel, Ignore, No, None, OK, Retry and Yes. When one of these push buttons is pressed at run time, it automatically assigns its ModalResult value to the form it is in.
 
You can also write event routines that assign ModalResult values to the events of other controls than push-buttons.
 
Closing a form causes the ModalResult to be set to the value Cancel. The value None indicates that no result has yet been received and that the form should continue to run in modal state.
 
None of the other values have predefined meanings.

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2