The information in this article applies to:
- Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b, 5.0, 5.0a
SYMPTOMS
The NODEFAULT clause is ignored in the KeyPress event of a text box custom
class based on the text box base class.
WORKAROUND
To work around this, perform the following:
- Edit the form.
- Click the text box on the form.
- Right-click the KeyPress event in the property sheet, and then click
Reset to Default.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article. We are researching this problem
and will post new information here in the Microsoft Knowledge Base as it
becomes available.
MORE INFORMATION
Steps to Reproduce Problem
- Create a form, and place a text box on the form.
- In the KeyPress event of the text box, enter the word, NODEFAULT.
- Save the text box as a class.
- Delete the text box from your form.
- Open the .vcx file containing the text box you just created.
- Place an instance of your new text box on your form, and run the form.
Note that you can't type into it. This is the expected behavior.
- Edit your form, and add the following line to the KeyPress event of the
instance of the text box:
TEXTBOX::KEYPRESS
- Run your form. Note that you can now type into it, but each letter you
type is doubled. This is the expected behavior.
- Edit your form, and from the KeyPress event of your text box, delete the
code you entered in step 7 (the line TEXTBOX::KEYPRESS).
- Run your form. Note that now you can type into it even though you
removed the code you added and returned it to its original status where
you couldn't type into it.
|