TX Text Control ActiveX

SaveToMemoryBuffer Method

Method

Returns a buffer containing text data in a specified format. The buffer can be a string or a one-dimensional byte array. To inform Text Control which kind of buffer is to be returned specify the buffer as the first parameter.

Syntax

TXTextControl.SaveToMemoryBuffer DataBuffer[, Format[, CurSelection]]

Parameters

ParameterDescription
DataBufferSpecifies a buffer that can be a string or a byte array. Text Control uses this parameter to get the type of the return buffer.
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 buffer, containing the saved data.

Data Types

NameData type
DataBufferString or One-dimensional Byte Array
FormatInteger
CurSelectionBoolean
Return valueSame Type as DataBuffer

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 using RTF format:

Dim RTF As String
RTF = TXTextControl1.SaveToMemoryBuffer(RTF, 5, True)
TXTextControl2.LoadFromMemory RTF, 5, True

See Also