TX Text Control ActiveX

SaveToMemory Method

Method

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

Syntax

TXTextControl.SaveToMemory [Format[, CurSelection]]

Parameters

ParameterDescription
FormatOptional. 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.
CurSelectionOptional. 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

NameData type
FormatInteger
CurSelectionBoolean
Return valueOne-dimensional Byte Array

Examples

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