Unicode Controls & Classes for VB6 - Version 4

ctlUniRichTextBoxXP.GetFormatRange Method

Permits you to get multiple formatting properties at a time

Syntax
Public Sub GetFormatRange (Optional ByVal bForSelection As Boolean = True, _
Optional ByRef bBold As Boolean, _
Optional ByRef bItalic As Boolean, _
Optional ByRef bUnderline As Boolean, _
Optional ByRef bStrikeout As Boolean, _
Optional ByRef lForeColor As Long, _
Optional ByRef lBackColor As Long, _
Optional ByRef sFontName As String, _
Optional ByRef iFontSize As Long, _
Optional ByRef bProtected As Boolean, _
Optional ByRef bLink As Boolean, _
Optional ByRef iUnderLineType As eCtlRichTextBox_UnderlineType, _
Optional ByRef cRevAuthor As Byte, _
Optional ByRef iStyle As Integer, _
Optional ByRef cAnimation As Byte, _
Optional ByRef iSpacing As Integer)
Parameters
Parameter Description
Optional ByVal bForSelection As Boolean = True True for returning properties for the current selection, False for the entire text
Optional ByRef bBold As Boolean (OUT) Returns True if the selected text is bold
Optional ByRef bItalic As Boolean (OUT) Returns True if the selected text is italic
Optional ByRef bUnderline As Boolean (OUT) Returns True if the selected text is underlined
Optional ByRef bStrikeout As Boolean (OUT) Returns True if the selected text is strikeout
Optional ByRef lForeColor As Long (OUT) Returns the forecolor of the selected text
Optional ByRef lBackColor As Long (OUT) Returns the backcolor of the selected text
Optional ByRef sFontName As String (OUT) Returns the font name of the selected text
Optional ByRef iFontSize As Long (OUT) Returns the font size of the selected text
Optional ByRef bProtected As Boolean (OUT) Returns the protected status of the selected text
Optional ByRef bLink As Boolean (OUT) Returns True if the selected text is marked as link
Optional ByRef iUnderLineType As eCtlRichTextBox_UnderlineType (OUT) Returns the underline type of the selected text
Optional ByRef cRevAuthor As Byte (OUT) Returns the revision author of the selected text
Optional ByRef iStyle As Integer (OUT) Returns the style of the selected text
Optional ByRef cAnimation As Byte (OUT) Returns the animation flag of the selected text
Optional ByRef iSpacing As Integer (OUT) Returns the spacing of the selected text
Remarks
Colors parameters (lForeColor, lBackColor) can be set (or returned by the control) equal to -1&; in this case colors these are automatic (CFE_AUTOCOLOR = vbWindowText / CFE_AUTOBACKCOLOR = vbWindowBackground)