Recognizers.GetDefaultRecognizer Method (Int32)
Returns the default recognizer for a known language, specified by a national language support (NLS) language code identifier (LCID).
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
Public Function GetDefaultRecognizer ( _
lcid As Integer _
) As Recognizer
'Usage
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 function GetDefaultRecognizer(
lcid : int
) : Recognizer
Parameters
lcid
Type: System.Int32The language code identifier (LCID) of the language for which you are retrieving the default recognizer.
Value
Meaning
0
The method uses the user's locale setting to determine which default recognizer to retrieve. If the user has not specified a locale in Regional Options, the method uses the locale that was specified for the computer.
System.Int32
The method uses the locale identifier to determine which default recognizer to retrieve.
Return Value
Type: Microsoft.Ink.Recognizer
Returns the requested recognizer.
Remarks
Each language can have a default recognizer. For example, a user can have a default recognizer for U.S. English and a default recognizer for French. If no locale is specified, this method returns the recognizer for the active input locale. To select the active input locale, in the Regional and Language Options in ControlPanel, on the Languages tab, click Details, and then select Default input language.
For more information about national language support (NLS), see NLS Terminology.
This method throws an exception if the LCID is not a known locale or if a recognizer is not installed for the requested locale. To find a recognizer for a locale neutral language, enumerate over the Recognizers collection and check the Languages property of each Recognizer object. For a table of LCIDs, see Table of Language Identifiers. For a list of the Microsoft® recognizers, see Using the Recognizers Collection.
Examples
This C# example gets the default recognizer for the Japanese language by using the LCID for Japanese and identifies it with the Recognizer object, recoDefault.
using Microsoft.Ink;
// . . .
Recognizers theRecognizers = new Recognizers();
int theLCID = 0x0411;
// Get the default recognizer for Japanese.
Recognizer recoDefault = theRecognizers.GetDefaultRecognizer(theLCID);
This Microsoft Visual Basic® .NET example gets the default recognizer for the Japanese language by using the LCID for Japanese and identifies it with the Recognizerobject, 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)
Platforms
Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0