Re: Default Input Language
- From: "Karl E. Peterson" <karl@xxxxxxxx>
- Date: Thu, 7 Jul 2005 14:23:12 -0700
Mukhalisi wrote:
> Im trying programmatically to obtain the "Default Input Languge"
> (found in Control panel -> Regional and Language Settings ->
> Languages -> Details -> Settings ) using VB6, Would appreciate any
> help
(Is this a multipost?)
' Win32 Locale functions
Private Declare Function GetSystemDefaultLangID Lib "kernel32" () As Integer
Private Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA"
(ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String, ByVal cchData
As Long) As Long
' Localized name of language
Private Const SORT_DEFAULT As Long = &H0 ' sorting default
Public Function LocaleLangauge(Optional LCID As Long) As String
Dim nRet As Long
Dim buf As String
' If user didn't provide an LCID, use
' current system default value.
If LCID = 0 Then
LCID = GetSystemDefaultLangID
End If
' Determine buffer requirement for language.
nRet = GetLocaleInfo(LCID, LOCALE_SLANGUAGE, buf, 0)
buf = Space$(nRet)
' Obtain language description.
Call GetLocaleInfo(LCID, LOCALE_SLANGUAGE, buf, Len(buf))
LocaleLangauge = TrimNull(buf)
End Function
--
Working Without a .NET?
http://classicvb.org/petition
.
- References:
- Default Input Language
- From: Mukhalisi
- Default Input Language
- Prev by Date: Re: Write Read to memory.
- Next by Date: Re: Write Read to memory.
- Previous by thread: Default Input Language
- Next by thread: Best VBScript tool/editor
- Index(es):
Relevant Pages
|