Unicode Controls & Classes for VB6 - Version 4

ctlUniTextCodeHighlight Control

Unicode text highlight component; can highlight HTML generic code (with php, asp, or javascript sections) or pure php, asp or javascript code.
Supports multiple undo and tab line indentation.
Internally it uses a ctlUniRichTextBox control so refer to its documentation for details on property methods missing on this page
Check common properties here

Enums
Name Description
eCtlTextCHZoneType Type of language to use for highlighting the code
Events
Name Description
SelChange This event is raised everytime the caret changes its position
LinkOver This event occurs when the mouse or the caret is over a link (a portion of text marked with the Link attribute (see [SelLink]))
ModifyProtected This event is raised evetytime a user tries to modify a part of text marked as protected, with the [SelProtected] property.
You can avoid the change by returning bDoIt=False
VScroll
HScroll
Change
Click
DblClick
KeyDown
KeyPress
KeyUp
MouseDown
MouseMove
MouseUp
MouseWheel Raised when the mouse wheel scrolls
IMEComposition Raised when the user confirms a string in the IME editor, check here for details
RequestResize Raised when the content of the control is bigger or smaller that the control size.
This event works only if you enable it using the [RequestResizeEvent] property (by Default is False)
AlignRTL
AlignLTR
Update Sent when an edit control is about to redraw itself. This notification message is sent after the control has formatted the text,
but before it displays the text. This makes it possible to resize the edit control window, if necessary.
Raised if the property [RaiseUpdateEvent] is enabled (by Default is False).
Paste Raised when some text is being pasted to the control.
Copy Raised when someone copies some text
Cut Raised when someone cut some text
MsgFilter Permits you to completely manage every RichEdit message changing it if you want.
You need to enable the [RaiseMsgFilterEvent] flag in order to receive this event.
OLEStartDrag
OLESetData
OLEGiveFeedback
OLEDragOver
OLEDragDrop
OLECompleteDrag
Properties
Name Type Description
Alignment (eUniTextbox_Alignment) Gets or sets the alignment for the entire text
AllowMultiCodePage (Boolean) Gets or sets the ability to use multiple codepage
BackColor (OLE_COLOR) Gets or sets the background color of the control
BackColorOut (OLE_COLOR) Gets or sets the Color of the area out of the border (when using Rounded Borders in a non WindowLess control)
Leave -1& for automatic management
BlockAutoCopy (Boolean) The Windows rich text box automatically intercepts some predefined hotkeys so it is able for example to Paste a text if you press the CTRL+V key.
Enable these properties if you need to write customized Copy/Cut/Paste/Undo functions.
BlockAutoCut (Boolean) The Windows rich text box automatically intercepts some predefined hotkeys so it is able for example to Paste a text if you press the CTRL+V key.
Enable these properties if you need to write customized Copy/Cut/Paste/Undo functions.
BlockAutoPaste (Boolean) The Windows rich text box automatically intercepts some predefined hotkeys so it is able for example to Paste a text if you press the CTRL+V key.
Enable these properties if you need to write customized Copy/Cut/Paste/Undo functions.
BlockAutoUndo (Boolean) The Windows rich text box automatically intercepts some predefined hotkeys so it is able for example to Paste a text if you press the CTRL+V key.
Enable these properties if you need to write customized Copy/Cut/Paste/Undo functions.
BorderColor (OLE_COLOR) Gets or sets the Border color
CanCopy (Boolean) Checks if the control can do some actions like Paste, Copy, Undo and Redo
CanPaste (Boolean) Checks if the control can do some actions like Paste, Copy, Undo and Redo
CanRedo (Boolean) Checks if the control can do some actions like Paste, Copy, Undo and Redo
CanUndo (Boolean) Checks if the control can do some actions like Paste, Copy, Undo and Redo
CurrentLine (Long) Gets or sets the current line
Enabled (Boolean) Enables or disables the control
Font (Font) Gets or sets the font used for text in the control, check the [ApplyFontChanges] for details
HideSelection (Boolean) Gets or sets the ability to maintain the text selection visible also when the control has no focus (set HideSelection = False)
HighlightTimeout (Single) Gets or sets the the maximum time the control can use for highlighting the code (in seconds)
Language (eCtlTextCHZoneType) Gets or sets the language used for highlighting
LeftMargin (Long) Gets or sets the left margin between text and the control border (in pixels)
Locked (Boolean) Returns or sets a value indicating whether the content of the control can be modified
Modified (Boolean) Gets or sets the modified flag for the text of the control, a user can reset it, then the flag is changed by the control
MouseIcon (Picture) Gets or sets the MouseIcon for the control
MousePointer (MousePointerConstants) Gets or sets the MousePointer for the control
MultiLine (Boolean) Gets or sets the multiline editing for the control
OLEDragMode (eCtlOLEDragMode) Gets or sets the OleDragMode for the control
OLEDropMode (eCtlOLEDropMode) Gets or sets the OleDropMode for the control
OnlyBottomBorder (Boolean) Gets or sets the ability to use only a bottom line for the border
RightMargin (Single) Gets or sets the right margin between text and the control border (in pixels)
RightToLeft (Boolean) Gets or sets the bidirectional input on the entire control
RoundedBorders (Boolean) Gets or sets Rounded borders
ScrollBars (ScrollBarConstants) Gets or sets the type of scrollbars used in the control
SelAlignment (eCtlRichTextBox_ParagraphAlignmentConstants)
SelAnimation (Byte)
SelBackColor (OLE_COLOR)
SelBold (Boolean)
SelBullet (eCtlRichTextBox_ParagraphNumberingConstants)
SelCharOffset (Long)
SelColor (OLE_COLOR)
SelFontName (String)
SelFontSize (Long)
SelHangingIndent (Long)
SelIndent (Long)
SelItalic (Boolean)
SelLength (Long) Gets or sets the length of the selected text
SelLink (Boolean)
SelParaRTL (Boolean)
SelProtected (Boolean)
SelRevAuthor (Byte)
SelRightIndent (Long)
SelSpacing (Integer)
SelStart (Long) Returns or sets the starting point of the selected text; indicates the insertion point if no text is selected (RUNTIME)
SelStrikeThru (Boolean)
SelStyle (Integer)
SelText (String) Gets or sets the selected text
SelUnderline (Boolean)
SelUnderlineType (eCtlRichTextBox_UnderlineType)
Text (String) Gets or sets the content of the control
Tip (String) Gets or sets the Unicode Tooltip for the control
UseRoundRegions (Boolean) Gets or sets the ability to use Round Regions for round borders instead of using the [BackColorOut] property;
VerticalLayout (Boolean) Gets or sets the vertical layout for asian languages
ViewMode (eCtlRichTextBox_ViewModes) Gets or sets the viewmode of the control
ZoomFactor (eCtlRichTextBox_ZoomFactor) Gets or sets the Zoom factor using a simpler method
Methods
Name Type Description
ApplyFontChanges When setting a new font on the control you need to call this function in order to refresh the interface
Copy Copies the selected text into the clipboard
Cut Cuts the selected text
Delete Deletes the selected text
EmptyUndo Clears the undo stack
Find (Long) Searches the text content for a certain string. Returns the index of the found string, -1 if the string cannot be found.
The iOptions parameter can be a combination of the [eCtlRichTextBox_FindOptions] enum values
FindReplaceAll (Boolean) Find and Replaces all occurences of a string into the text of the control
FindSelect (Long) Searches the text content for a certain string and selects it. Returns the index of the found string, -1 if the string cannot be found.
The iOptions parameter can be a combination of the [eCtlRichTextBox_FindOptions] enum values
GetCharFromPos (Long) Returns the character pointed by given (mouse) coordinates
GetContents (String) Gets the content of the control
GetContentsUTF7 Gets contents using the UTF7 encoding
GetContentsUTF8 Gets contents using the UTF8 encoding
GetCurrentSelType (eCtlRichTextBox_SelectionTypeConstants) Gets the current selection type
GetFirstVisibleLine (Long) Returns the index of the first visible line in the viewport
GetFormatRange Permits you to get multiple formatting properties at a time
GetLastVisibleLine (Long) Gets the index of the last visible line in the viewport
GetLineFirstCharIndex (Long) Gets the index of the first char of a certain line
GetLineFromCharIndex (Long) Returns the line number from the passed character index
GetLineLength (Long) Returns the number of chars in a certain line
GetLinesCount (Long) Gets the number of lines in the text
GetParagraphLineSpacing Gets paragraph line spacing
GetParagraphOffsets Returns paragraph offsets (see also [SelRightIndent], [SelIndent], [SelHangingIndent])
GetParagraphSpacing Gets paragraph spacing
GetPosFromChar Returns the (X,Y) position from the specified char index
GetSelection Gets the selection indexes; same as using [SelStart] and [SelLength]
GetZoom (Boolean) Gets the current zoom factor, works starting from RichEdit 3.0
HScroll Scrolls horizontally
hWnd (Long) Retuns the handle associated with the control
IsInIME (Boolean) You can use this property for knowing if the KeyPress, KeyDown and KeyUp events have been raised by the active IME window associated to your control.
LoadFile (Boolean) Loads a file into the control
OLEDrag Starts an OLEDrag operation
Paste Pastes text from the clipboard
Redo Executes a redo operation
RichEditVersion (eCtlRichTextBox_Version) Returns the richedit version used by the system
SaveFile (Boolean) Saves the content of the control to a file; Returns True if the operation finished correctly
ScrollCaret Scrolls the caret into view in an edit control
SelectAll Selected all text
SelectNone Unselected all text
SelRTF (String) Returns the text (in rtf format) in the current selection of a RichTextBox control. Not available at design time
SetContents Sets the content of the control
SetEditStyle Sets the control edit style
SetFormatRange Permits you to set multiple formatting properties at a time
SetParagraphLineSpacing Sets the paragraph line spacing
SetParagraphOffsets Sets paragraph offsets (see also [SelRightIndent], [SelIndent], [SelHangingIndent])
SetParagraphSpacing Sets paragraph spacing
SetSelection Sets the current selection by specifying indexes
SetZoom (Boolean) Sets the current Zoom, works starting from RichEdit 3.0
check the [ZoomFactor] property for a simpler way
TextLength (Long) Returns the length of the internal text
Undo Executes an undo operation
Undo_AutoManageMenu Gives the control the ability to manage your Undo/Redo menu in an automatic way.
Undo_SaveCurrent You need to call this function when you want to disable the Undo menu because you saved the file
Undo_SaveInfo Saves undo info (you don't need to call it directly)
VScroll Scrolls vertically
Remarks