Display the Spell Checker Dialog Box
There are three possible ways to display the spell checker dialog box. One way to display the dialog box is by setting the Mode property of the WinSpellChecker™ component to either DialogOnValidating or DialogOnValidatingAndAsYouType. Setting this property to one of these two enumerations will cause the spell checker dialog box to appear when the RichTextBox’s Validating event is fired as long as there are unknown words in the text being spell checked.
The other two ways to display the spell checker dialog box is to use two methods. The first method, ShowSpellCheck , will display the spell checker dialog box non-modally. The second method, ShowSpellCheckDialog , will display the spell checker dialog box modally. These methods are overloaded and can take in one or two parameters: the owner of the dialog box and the object you want to spell check. This topic will discuss the second overload which takes in only the spellCheckTarget object.
Inside of any button click event, add the following code to display a non-modal dialog box.
' Show the spellchecker dialog non-modally for a richTextBox
' on the form. This overload takes in one parameter:
' the spellCheckTarget object, or, the object on the form
' that you would like to spellcheck. If you would like to
' show a modal dialog, use the ShowSpellCheckDialog method.
Me.UltraSpellChecker1.ShowSpellCheck(Me.RichTextBox1)
// Show the spellchecker dialog non-modally for a richTextBox
// on the form. This overload takes in one parameter:
// the spellCheckTarget object, or, the object on the form
// that you would like to spellcheck. If you would like to
// show a modal dialog, use the ShowSpellCheckDialog method.
this.ultraSpellChecker1.ShowSpellCheck(this.richTextBox1);