Private Sub Option1_Click(Index As Integer) Select Case Index Case 0   JRSpell1.ClearAllSelections RichTextBox1.hWnd, Rtf_Control   JRSpell1.SelectionMethod = Sel_BackColor
Case 1   JRSpell1.ClearAllSelections RichTextBox1.hWnd, Rtf_Control   JRSpell1.SelectionMethod = Sel_DoubleUnderline End Select JRSpell1.SpellCheckDocument RichTextBox1.hWnd, Rtf_Control End Sub
Public Enum selectiontypesb             Sel_BackColor=0             Sel_DoubleUnderline=1             Sel_TwigglyUnderline=2 'Only for TX-Control Ver.8.0 or higher             Sel_ForeColor=3             Sel_nothing = 10 End Enum
Up from V2.4 you can use the JRSpell1.RestoreForeColor propertie to set the forecolor for spelled text in use with the Sel_ForeColo Function.
|