Recognizers.GetDefaultRecognizer 方法 (Int32)

返回由区域语言支持 (NLS) 语言代码标识符 (LCID) 指定的已知语言的默认识别器

命名空间:  Microsoft.Ink
程序集:  Microsoft.Ink(在 Microsoft.Ink.dll 中)

语法

声明
Public Function GetDefaultRecognizer ( _
    lcid As Integer _
) As Recognizer
用法
Dim instance As Recognizers
Dim lcid As Integer
Dim returnValue As Recognizer

returnValue = instance.GetDefaultRecognizer(lcid)
public Recognizer GetDefaultRecognizer(
    int lcid
)
public:
Recognizer^ GetDefaultRecognizer(
    int lcid
)
public Recognizer GetDefaultRecognizer(
    int lcid
)
public function GetDefaultRecognizer(
    lcid : int
) : Recognizer

参数

  • lcid
    类型:System.Int32
    为其检索默认识别器的语言的语言代码标识符 (LCID)。

    含义

    0

    该方法使用用户的区域设置确定要检索的默认识别器。如果用户没有在“区域选项”中指定区域设置,则该方法使用为计算机指定的区域设置。

    System.Int32

    该方法使用区域设置标识符确定要检索的默认识别器。

返回值

类型:Microsoft.Ink.Recognizer
返回请求的识别器。

备注

每种语言可以有一个默认识别器。例如,用户可以有一个用于美国英语的默认识别器和一个用于法语的默认识别器。如果没有指定区域设置,则此方法返回活动输入区域设置的识别器。若要选择活动的输入区域设置,请在控制面板的“区域和语言选项”中,在“语言”选项卡上单击“详细信息”,然后选择“默认输入语言”。

有关区域语言支持 (NLS) 的更多信息,请参见 NLS Terminology(NLS 术语)。

如果 LCID 不是已知区域设置或者如果没有为请求的区域设置安装识别器,此方法将引发异常。若要查找非特定区域性语言的识别器,请枚举 Recognizers 集合并检查每个 Recognizer 对象的 Languages 属性。有关 LCID 表,请参见 Table of Language Identifiers(语言标识符表)。有关 Microsoft(R) 识别器列表,请参见Using the Recognizers Collection

示例

此 C# 示例通过使用日语的 LCID 获取日语的默认识别器,并使用 Recognizer 对象 recoDefault 标识该识别器。

using Microsoft.Ink;
// . . .
Recognizers theRecognizers = new Recognizers();
int theLCID = 0x0411;
// Get the default recognizer for Japanese.
Recognizer recoDefault = theRecognizers.GetDefaultRecognizer(theLCID);

此 Microsoft Visual Basic(R) .NET 示例通过使用日语的 LCID 获取日语的默认识别器,并使用 Recognizer 对象 recoDefault 标识该识别器。

Imports Microsoft.Ink
' . . .
Dim theRecognizers As Recognizers = New Recognizers()
Dim recoDefault As Recognizer
Dim theLCID As Integer = &H411   ' The LCID for Japanese
'Get the default recognizer for Japanese.
recoDefault = theRecognizers.GetDefaultRecognizer(theLCID)

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

Recognizers 类

Recognizers 成员

GetDefaultRecognizer 重载

Microsoft.Ink 命名空间

Recognizer