Showing a Message Box
Displaying a done spell checking message box
To show a message box when the spell checking is complete, enter the following code in the Button1_Click event:
' when spell checking is done, give the user some feedback
If Me.C1Spell1.BadWordCount > 0 Then
MessageBox.Show(("Done spell checking. " + Me.C1Spell1.BadWordCount + " typing errors."))
Else
MessageBox.Show("Done spell checking. No spelling errors.")
End If
• C#
// when spell checking is done, give the user some feedback
if (this.c1Spell1.BadWordCount > 0)
MessageBox.Show("Done spell checking. " + this.c1Spell1.BadWordCount + " typing errors.");
else
MessageBox.Show("Done spell checking. No spelling errors.");
The message box appears when spell checking is complete, showing the total number of misspellings:
Displaying an errors message box
The C1Spell component has a SpellError event that is fired if some error has occurred within the component. To show a message box displaying what error has occurred within the C1Spell component, add the following code in the event handler:
MessageBox.Show(e.ErrorDesc)
• C#
MessageBox.Show(e.ErrorDesc);
|