

Last update :
June 9, 1997
Problem:
When Pragma displays a form, that form can usually be closed in three ways:
This last feature, hitting the RETURN key, is not always desired, since many people are used to abuse the RETURN key and then find themselves with a closed form.
Solution:
To disable the RETURN key add an extra button to your form. Set the property Visible to FALSE and the property Default button to TRUE. There is no need to write an event verb for the button.
That invisible button now becomes the default button and every time that the RETURN key is pushed the default button's event will be triggered. Since the event verb is empty, nothing will happen. Please note that only one button can be the default button for a form.
Nothing prevents you to use the event verb of the default button, enabling you to trigger it with the RETURN key. But be careful. Not only the RETURN key triggers the event verb of the default button.
![]()