You can still use control validation to lock focus to a control, but you do not need to be concerned with the behavior with regard to closing the form.
您仍可以使用控件验证将焦点锁定到控件,但不必考虑关闭窗体的行为。
As we did for USERNAME in the previous step, set the value as required on the validation TAB, and set the control up to display validation error messages in an error message control.
如我们上一步对USERNAME做的一样,将验证选项卡上的值设为必须,然后在错误消息控制中设定显示验证错误消息。
You'll also need to build your own validators in cases where you want explicit control over the validation messages displayed to the end user.
如果需要明确控制显示给最终用户的消息,那么还需要建立自己的验证器。
应用推荐