Share via


ToString Method

ToString Method

Has the default recognizer perform recognition on the collection of strokes and returns the top string of the top alternate of the recognition result.

Declaration

[C++]

HRESULT ToString (
    [out, retval] BSTR *ToString
);
      

[Microsoft® Visual Basic® 6.0]

Public Function ToString() As String
      

Parameters

ToString

[out] The top string of the TopAlternate property of the IInkRecognitionResult object, after the default recognizer performs recognition on the collection of strokes.

For more information about the BSTR data type, see Using the Automation Library.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER A parameter contained an invalid pointer.
E_FAIL Operation failed.
E_OUTOFMEMORY Out of memory.
E_INK_EXCEPTION An exception occurred inside the method.
TPC_E_RECOGNIZER_NOT_REGISTERED No recognizers are installed.

Remarks

Caution: The ToString method of the InkStrokes collection is deprecated. It should not be used for handwriting recognition applications; it can be used for debugging purposes.

ToString returns NULL (Nothing in Visual Basic 6.0) if:

  • The InkStrokes collection is empty.
  • A default recognizer cannot be created.
  • The default recognizer does not support free input.

Note: See the String property for the equivalent to this method for the IInkRecognitionAlternate object.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example puts the string recognized from the InkStrokes collection theStrokes into a text control Text1.

TextBox1.Text = theStrokes.ToString()
      

Applies To