TCnButton.DialogResult Property
Gets or sets a value that is returned to the parent form when the button is clicked.
published property DialogResult: TDialogResult read GetDialogResult write SetDialogResult default TDialogResult.drNone;
If the DialogResult for this property is set to anything other than None, and if the parent form was displayed through the ShowDialog method, clicking the button closes the parent form without your having to hook up any events. The form's DialogResult property is then set to the DialogResult of the button when the button is clicked.