Group 1: Simple spell checking

The first group box consists of a simple TextBox and a Button. Type in some text and click the button to start the spell checking process.

The TXSpell.Check method is simply called with the text of the TextBox. The TXSpell.IncorrectWords collection retrieves all misspelled words. If the IncorrectWords.Count property returns more than 0, some words of the text are misspelled.

[C#]
txSpellChecker1.Check(tbDemo1.Text);

if (txSpellChecker1.IncorrectWords.Count > 0)
{
	tbDemo1.SelectAll();
	MessageBox.Show("The text box contains misspelled words.",
		"TX Spell .NET Demo",
		MessageBoxButton.OK,
		MessageBoxImage.Error);
}
else
	MessageBox.Show("Spelling is correct.",
		"TX Spell .NET Demo",
		MessageBoxButton.OK,
		MessageBoxImage.Information);
[Visual Basic]
txSpellChecker1.Check(tbDemo1.Text)

If txSpellChecker1.IncorrectWords.Count > 0 Then
	tbDemo1.SelectAll()
	MessageBox.Show("The text box contains misspelled words.", "TX Spell .NET Demo", MessageBoxButton.OK, MessageBoxImage.[Error])
Else
	MessageBox.Show("Spelling is correct.", "TX Spell .NET Demo", MessageBoxButton.OK, MessageBoxImage.Information)
End If