Factoid Property [PenInputPanel Class]

Factoid Property [PenInputPanel Class]

Gets or sets the string name of the factoid used by the PenInputPanel object.



[propput] HRESULT put_Factoid (
    [in] BSTR Factoid);
[propget] HRESULT get_Factoid (
    [out, retval] BSTR *Factoid);

[Microsoft® Visual Basic® 6.0]

Public Property Get Factoid() As String
Public Property Let Factoid ( _
    theFactoid As String)

Property Value

BSTR The name of the factoid used by the PenInputPanel object.

This property is read/write.

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

Return Value

HRESULT valueDescription
TPC_E_OUT_OF_ORDER_CALLThis property cannot be assigned after strokes have been added to the control.
E_NOTIMPLThe recognizer does not support this method.
E_OUTOFMEMORYCannot allocate memory to complete the operation.
E_FAILAn unspecified error occurred.
E_INK_EXCEPTIONAn exception occurred.
E_INVALIDARGThe context is invalid or the parameter is an invalid pointer.
E_UNEXPECTEDUnexpected parameter or property type.


A factoid provides a recognizer context for ink within a particular field. You specify a factoid if an input field is of a known type. For example, if the input field contains a date, specify the Date factoid.

For more information about factoids and how to use them, see Improving Tablet PC Recognition Accuracy by Setting Context. For a list of possible values for the Factoid property, see Supported Factoids from Version 1.

Note: String representations of factoids are case-sensitive.

This property has no effect on keypads or keyboards.

The WordList factoid is not supported for the PenInputPanel object.

The default value for the Factoid property is DEFAULT. In Latin locales, all factoids may be used. In East Asian locales, the following factoid values are relevant:

  • Digit Implies the Num bias button on the East Asian writing pad
  • OneChar Implies the Alpha bias button on the East Asian writing pad
  • Common factoids (JapaneseCommon, ChineseSimpleCommon, ChineseTraditionalCommon, KoreanCommon, KanjiCommon, and HangulCommon) imply the Alpha/Num bias button on the East Asian writing pad

All factoid values other than DIGIT and ONECHAR are interpreted as the common factoid that is appropriate for the current input locale.

If the Factoid property is set, it is forwarded to the recognizer only if the SetInputScope function has not also been called.


[Visual Basic 6.0]

This Visual Basic 6.0 creates a PenInputPanel object, thePenInputPanel, and attaches it to an InkEdit control, InkEdit1. It then sets the Factoid property of a recognizer context to look for numbers.

' Declare a new PenInputPanel object
Dim thePenInputPanel As PenInputPanel

' Create the PenInputPanel
Set thePenInputPanel = New PenInputPanel

' Attach the PenInputPanel to an InkEdit control
thePenInputPanel.AttachedEditWindow = InkEdit1.hWnd

' Set the recognizer context to look for numbers
thePenInputPanel.Factoid = "DIGIT"

Applies To

Related Topics