AutoCorrect can be very annoying on a smartphone - we all know this. But if you are used to it and then start typing on a computer keyboard, you are missing this time saving feature.

AutoCorrect using TX Text Control and TX Spell .NET

TX Spell .NET provides a very powerful spell checking and suggestion engine that can be used to implement AutoCorrect with a few lines of code:


Based on the analysis of thousands of test documents, the expected suggestion is ranked at position 1 or 2 in more than 97% of all cases. The algorithm includes the measurement of the distance between the keys on the currently used keyboard. Many different factors are evaluated and rated to create the accurate list of suggestions.

Essentially, the KeyPress event is used to trap keystrokes when a delimiter such as a space, a '.' or a ',' is typed in. Afer that, the misspelled word at the current input position is checked and replaced with the first suggestion of the TX Spell .NET suggestion engine.

This implementation checks also, if you intentionally typed a word incorrect. The second time you "correct" the correction, AutoCorrect is not applied to the same word again.

AutoCorrect using TX Text Control and TX Spell .NET

Happy coding!