Поделиться через


PenInputPanel.EnableTsf - метод

Обновлен: Ноябрь 2007

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.

Пространство имен:  Microsoft.Ink
Сборка:  Microsoft.Ink (в Microsoft.Ink.dll)

Синтаксис

'Декларация
<UIPermissionAttribute(SecurityAction.Demand, Window := UIPermissionWindow.SafeTopLevelWindows)> _
<SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted := True)> _
<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name := "FullTrust")> _
Public Sub EnableTsf ( _
    enable As Boolean _
)
'Применение
Dim instance As PenInputPanel
Dim enable As Boolean

instance.EnableTsf(enable)
[UIPermissionAttribute(SecurityAction.Demand, Window = UIPermissionWindow.SafeTopLevelWindows)]
[SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted = true)]
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
public void EnableTsf(
    bool enable
)
[UIPermissionAttribute(SecurityAction::Demand, Window = UIPermissionWindow::SafeTopLevelWindows)]
[SecurityPermissionAttribute(SecurityAction::Demand, Unrestricted = true)]
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = L"FullTrust")]
public:
void EnableTsf(
    bool enable
)
/** @attribute UIPermissionAttribute(SecurityAction.Demand, Window = UIPermissionWindow.SafeTopLevelWindows) */
/** @attribute SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted = true) */
/** @attribute PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust") */
public void EnableTsf(
    boolean enable
)
public function EnableTsf(
    enable : boolean
)

Параметры

  • enable
    Тип: System.Boolean
    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.

Заметки

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

ms569656.alert_note(ru-ru,VS.90).gifПримечание.

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.

ms569656.alert_security(ru-ru,VS.90).gifПримечание о безопасности.

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.

Примеры

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)

Платформы

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

PenInputPanel Класс

PenInputPanel - члены

Microsoft.Ink - пространство имен