PRB: Return 0 in TextBox Valid Allows Switching Active Form (161864)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q161864 SYMPTOMS
The Help for Visual FoxPro states the following about the Valid event of a
control:
If 0 is returned, the control does not lose focus.
This is true if you try to move between controls on a single form. But if a
control returns 0 in the Valid event, you will be able to move the focus to
a different form.
RESOLUTION
To prevent the control from losing focus, you should return .F. (False)
from the Valid event of the control:
RETURN .F.
To disable the "Invalid Input" message that a False (.F.) return value
causes, issue the following command:
SET NOTIFY OFF
This should be done at the start of an application or in the Init event of
a form.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 12/3/2003 |
---|
Keywords: | kbbug KB161864 |
---|
|