Tips and hints

You are here: Home > Support > WSpell

This document contains various tips and suggestions for using WSpell.

  • If the ShowDialog property is True, the built-in spell check dialog appears briefly when the Start method is called even if there is no text to check or the text contains no misspelled words. If you want to prevent the dialog from appearing, first determine if the text contains any misspelled words: Set ShowDialog to False, catch the EndOfText event, then call the Start method. If the EndOfText event was fired, then the text contains no misspelled words so there's no need to continue. If the EndOfText event is not fired, then the text contains at least one misspelled word, or a word with some other problem (e.g., doubled word, embedded digits, etc.). Set ShowDialog to True, set the Text or TextControlHWnd properties again to reset WSpell, then call the Start method. Here is some sample code that demonstrates this approach:

Dim eot As Boolean
eot = False

WSpell1.Text = textbox1.Text
WSpell1.ShowDialog = False
WSpell1.Start

If (Not eot) Then
' At least one problem was detected
WSpell1.Text = textbox1.Text
WSpell1.ShowDialog = True
WSpell1.Start
End If

Private Sub WSpell1_EndOfText()
eot = True
End Sub
  • If you want to check text in two or more languages, don't open dictionaries for both languages at the same time. Having dictionaries for two languages open at once increases the probability that a misspelled word in one language will match a valid word in the other language, and therefore will not be detected. Also, having two main dictionaries open at once will increase the time required to check spelling and look up suggestions. Instead, use two (or more) instances of the WSpell control, and open the dictionary for one language in each instance. At run time, use the appropriate WSpell instance to check text based on the text's language.

Wintertree Software Inc.

Site index:


[Home] [Products] [Catalog] [Ordering] [Search] [Contact Us]


Copyright © 2015 Wintertree Software Inc.