TXTextControl.SaveToMemory Method

Returns a one-dimensional byte array containing text data in a specified format.

Syntax

TXTextControl.SaveToMemory [Format[, CurSelection]]
Parameter Description
Format

Optional. Specifies a format identifier. When this parameter is not specified the data is saved in the internal Text Control format (3). See the Format parameter of the Save method for possible format identifiers.

CurSelection

Optional. When set to True the current selection is saved. When omitted or set to False or when no selection exists all the control contents are saved.

Return Value

The method returns a one-dimensional array of bytes, containing the saved data.

Data Types

Format: Integer
CurSelection:    Boolean
Return value:    One-dimensional Byte Array

Example

This Basic example copies the currently selected text from the first Text Control and inserts it at the current input position of a second Text Control:

Dim data() As Byte
data = TXTextControl1.SaveToMemory(3, True)
TXTextControl2.LoadFromMemory data, 3, True

See Also