HighTechTalks DotNet Forums  

[OT] windows api input language change

Dotnet Internationalization microsoft.public.dotnet.internationalization


Discuss [OT] windows api input language change in the Dotnet Internationalization forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default [OT] windows api input language change - 03-24-2006 , 08:21 AM







hi. apologies for off topic post, but hoping someone here can help me
as this is a windows API problem.

how to change the windows input language with API calls to windows XP?

why?
i need API calls because the language i'm using (Divehi, complex RTL)
though supported in WinXP is not supported in Office2003 (thus Access)
=> not in MsoAppLanguageID defined languages.

please help

riyaz


Reply With Quote
  #2  
Old   
Michael \(michka\) Kaplan [MS]
 
Posts: n/a

Default Re: [OT] windows api input language change - 03-24-2006 , 11:17 AM






The numeric value for Divehi is 0x0465 (or &H0465 in VBA) -- just because
its not in the Office enum does not mean you can't send the value in....

Where are you using the MsoAppLanguageID, exactly?


--
MichKa [Microsoft]
NLS Collation/Locale/Keyboard Technical Lead
Globalization Infrastructure, Fonts, and Tools
Blog: http://blogs.msdn.com/michkap

This posting is provided "AS IS" with
no warranties, and confers no rights.


<rmanchu (AT) gmail (DOT) com> wrote

Quote:
hi. apologies for off topic post, but hoping someone here can help me
as this is a windows API problem.

how to change the windows input language with API calls to windows XP?

why?
i need API calls because the language i'm using (Divehi, complex RTL)
though supported in WinXP is not supported in Office2003 (thus Access)
=> not in MsoAppLanguageID defined languages.

please help

riyaz




Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: windows api input language change - 03-24-2006 , 01:20 PM




Michael (michka) Kaplan [MS] wrote:
Quote:
The numeric value for Divehi is 0x0465 (or &H0465 in VBA) -- just because
its not in the Office enum does not mean you can't send the value in....
i asked about this initially in microsoft.public.access.forms and was
adviced by a MVP to ask here.

my core problem is this; on an Access form textbox control, i canNOT
set the .KeyboardLanguage to Divehi eventhough i CAN see it in the
dropdown list for that property (Divehi is correctly installed for sure
as i can use it in all applications). no-one was able to solve it. my
research lead me to believe that Divehi is not supported in Office as
its not in the enum list (whatever ...), i guess it was my guess ...

i am unable to change the .KeyboadLanguage to Divehi following all
advice in m.p.a.f

since it works fine if i manually change the windows language (language
bar) as a last resort i'm trying to automate that process ...
unfortunately with NO success.

please help
riyaz



Reply With Quote
  #4  
Old   
AT
 
Posts: n/a

Default Re: windows api input language change - 03-24-2006 , 02:40 PM



thanx to Michka for replying.

for info: posting back for those having a similar problem, found the
solution:

solution: (its self explanatory - change as needed for diff. languages)


Option Compare Database
Option Explicit

Private Declare Function GetKeyboardLayout Lib "user32" (ByVal IdThread
As Long) As Long
Private Declare Function ActivateKeyboardLayout Lib "user32" (ByVal HKL
As Long, ByVal flags As Long) As Long

Private Const KLF_REORDER = &H8
Private Const lang_Divehi_Phonetic = 73729125
Private Const lang_US_English = 67699721

Private CurrentLanguage As Long

Public Function eventFieldGotFocus() As Boolean
CurrentLanguage = GetKeyboardLayout(0)
Call ActivateKeyboardLayout(lang_Divehi_Phonetic, KLF_REORDER)
eventFieldGotFocus = True
End Function

Public Function eventFieldLostFocus() As Boolean
Call ActivateKeyboardLayout(CurrentLanguage, KLF_REORDER)
eventFieldLostFocus = True
End Function


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.