Form objects should have the “acceptButton” and the “cancelButton” properties. the property value contains the name of a button object.
When one of the buttons is clicked, the dialog form should close.
This way, the “application.showFormInDialog” can return what button is used to close the form and your method van act upon it, returning a specific value or null.
Hmm, I don’t know if this ‘should’ be the case. I do know this would be convenient sometimes. Offcourse you can catch the keys on the form and execute your code already.
You either fill a global with the desired value or you just execute a form method or the method on another form.
I for one execute the code that I want via one or methods in the form/dialog itself.