WSpell ActiveX Spell Checker for Visual Basic |
Home Site index Contact us Catalog Shopping Cart Products Support Search |
You are here: Home > Add a spell checker to your applications > Visual Basic > Using WSpell > How to check spelling of a string interactively
To check the spelling of a string and interact with the user via WSpell's built-in spelling dialog box, perform the steps listed below.
Set WSpell's Text property with the value of the string you want to check.
Set the ShowDialog property to True. This will cause the built-in spelling dialog box to appear.
Set the ShowContext property to True. This will expand the built-in spelling dialog box to include a context display so the user can see the misspelled words in their context.
Call the Start method to begin checking. WSpell will check the spelling of each word in the text. Misspelled words will be presented to the user via the built-in spelling dialog box. Any corrections made by the user will cause the text to be updated. WSpell will also fire events as misspelled words are detected and the text is changed (see below).
When the Start method returns, obtain the corrected text through the Text property.
During checking, WSpell fires certain events to signal the detection of misspelled words and changes to the text. The following events may be fired during a spelling check:
ConditionallyChangeWord
These events will be handled by the built-in spelling dialog box, so they don't need to be handled by your application. However, they can also be handled by your application if necessary to respond in some application-specific way. For example, when MisspelledWordEvent is fired, your application might increment a counter recording the number of misspelled words detected
Copyright © 2015 Wintertree Software Inc.