PRB: Spell Checking Edit Box Contents Does Not Work

Last reviewed: April 22, 1996
Article ID: Q136641
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 3.0

SYMPTOMS

The following error appears if you place an edit box on a form, set its ControlSource property to a memo field from a table, and then try to run the FoxPro Spell Checker on that memo field:

   Window on top is not a text editing window.

CAUSE

The FoxPro Spell Checker works in a text-editing window only. Examples of text-editing windows are the windows opened by the MODIFY COMMAND command and the editing window opened from a memo field in a Browse window.

An EditBox control is not a text-editing window. Consequently, the Spell Checker will not run. You can test for the window on top by opening the Debug window and entering "wontop()" as the condition to test for while a form is running and an edit box is the current control. The debug window will show that the form is the current window.

WORKAROUND

To use the Spell Checker to spell check a memo in a form, first open a text- editing window. To do this, use the MODIFY MEMO command.

Create a form and place an EditBox control on it, and set its ControlSource property to a memo field in your table. Use the following code to run the MODIFY MEMO command:

  1. In the DblClick event procedure of the EditBox, enter this code:

    MODIFY MEMO NOTES NOWAIT * opens a text editing window that displays the memo field * assuming the memo field is called "notes" * the "nowait" clause allows execution to continue

    DO (_SPELLCHK) * the _spellchk system variable references the spell checker that * will be executed by FoxPro

    CLOSE MEMO NOTES * this closes the text editing window after the user exits the * spell checker

  2. Alternatively, add a command button to the form, and enter the same commands in the Click event procedure for the button.

STATUS

This behavior is by design.

MORE INFORMATION

For more information about the Spell Checker, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q117212
   TITLE     : How to Use the FoxPro Spelling Checker (SPELLCHK.APP)

NOTE: the Spell Checker is provided by a third-party vendor. It cannot be distributed without that vendor's permission.


Additional reference words: 3.00 VFoxWin
KBCategory: kbtool kbprb
KBSubcategory: FxotherGeneral


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 22, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.