Share via


PenInputPanel.EnableTsf Method

Deprecated. Indicates whether or not the PenInputPanel object attempts to send text to the attached control through the Text Services Framework (TSF) and enables the use of the correction user interface. PenInputPanel has been replaced by Microsoft.Ink.TextInput.

Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)

Syntax

'Declaration
Public Sub EnableTsf ( _
    enable As Boolean _
)
'Usage
Dim instance As PenInputPanel
Dim enable As Boolean

instance.EnableTsf(enable)
public void EnableTsf (
    bool enable
)
public:
void EnableTsf (
    bool enable
)
public void EnableTsf (
    boolean enable
)
public function EnableTsf (
    enable : boolean
)
Not applicable.

Parameters

  • enable
    A Boolean variable that indicates whether or not the PenInputPanel object attempts to send text to the attached control through the Text Services Framework (TSF) and enables the use of the correction user interface.

    If true, the PenInputPanel object attempts to send text to the attached control through the Text Services Framework (TSF), and the correction user interface is enabled.

    If false, the PenInputPanel object attempts to disable TSF on the attached control. The correction user interface is unavailable.

Remarks

Calling this method with the enable parameter set to true causes the PenInputPanel object to attempt to start the TSF on the attached control.

Note

Support has been added to TSF and to provide a consistent user interface for all applications across the desktop. This new support enables legacy applications or controls that are not aware of TSF to take advantage of some advanced text services. For example, speech dictation and handwriting can now be used to enter text into a document in any application.

This new feature is available and enabled by default on Microsoft® Windows® XP Tablet PC Edition. To enable or disable the feature:

1. In Control Panel, click Regional and Language Options.

2. On the Languages tab, click Details.

3. On the Advanced tab of the Text Services and Input Languages dialog box, select or clear Extend support of advanced text services to all programs.

If successful, text is sent to the attached control through TSF. Furthermore, if the control supports TSF (and is not receiving text from TSF only because Advanced Text Services is enabled, as in the previous procedure), then the correction user interface appears in the control with access to handwriting alternates. Calling this method with the enable parameter set to false causes the PenInputPanel object to attempt to disable TSF on the attached control.

Use the EnableTsf method to enable the PenInputPanel to use the TSF insertion context rather than SendInput Function to send the handwriting recognition results into the control. By enabling the PenInputPanel to use the TSF insertion context, text can be inserted even if the field no longer has focus.

When you call this method with the enable parameter set to true, the PenInputPanel object sends an EM_SETEDITSTYLE message to the attached control. If the control does not support this message, results may be unpredictable.

The InkEdit control does support TSF.

Security noteSecurity Note:

If using under partial trust, this method requires SecurityPermissionFlag.AllFlags permission, in addition to the permissions required by PenInputPanel. See Security and Trust for more information.

Example

This C# example attaches a PenInputPanel object, thePenInputPanel, to an InkEdit control, theInkEdit. The EnableTsf method is called on the PenInputPanel to start the TSF.

[C#]

// Declare, create, and attach a new
// PenInputPanel to an InkEdit control.
PenInputPanel thePenInputPanel = new PenInputPanel(theInkEdit);

// Start the Text Services Framework
thePenInputPanel.EnableTsf(true);

This Microsoft Visual Basic® .NET example attaches a PenInputPanel object, thePenInputPanel, to an InkEdit control, theInkEdit. The EnableTsf method is called on the PenInputPanel to start the TSF.

[Visual Basic]

'Declare, create, and attach a new
'PenInputPanel to an InkEdit control.
Dim thePenInputPanel As New PenInputPanel(theInkEdit)

'Start the Text Services Framework
thePenInputPanel.EnableTsf(True)

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

PenInputPanel Class
PenInputPanel Members
Microsoft.Ink Namespace