VSSpell Control > VSSpell All Members > VSSpell Events > TypingError Event |
Fired when a typing error is detected after the CheckTyping method is invoked.
Private Sub VSSpell_TypingError(ByVal SelStart As Long, ByVal SelLength As Long, Cancel As Integer)
The TypingError event indicates that the user typed a bad word. The offending word may be retrieved using the CheckWord property. The position and length of the offending word are indicated in the SelStart and SelLength parameters.
After the event is handled, VSSpell will perform the action specified by the TypingErrorAction property by default. If you set the Cancel parameter to True, VSSpell does not perform any actions. This mechanism allows you to inform the user of typing mistakes in custom ways.
Note: This event is only fired in as-you-type spell-checking mode, invoked with the CheckTyping method. In this mode, the Text property is not used by VSSpell. This is done for efficiency since the contents of the control change constantly as the user types.