Reputation: 8694
I have a muulti-language Access application that needs access to languages/keyboard layouts installed on the machine. I have certain fields that accept input in various languages. I would like to be able to change the active language/keyboard layout when these fields are entered and exited.
I'm sure that there is some sort of windows API for this but I haven't been able to turn anything up. I would be happy for any code examples, links or anything that could get me pointed in the right direction.
Upvotes: 3
Views: 2086
Reputation: 16818
You can change the active keyboard layout using the Keyboard Input Functions. The functions you should look at are:
You can find a list of Locale IDs on MSDN or download from here. You can get the currently installed locales using the EnumSystemLocales function. I can't vouch for the quality of the code, but here are some examples of using these functions:
http://vbnet.mvps.org/index.html?code/locale/enumsystemlocales.htm
http://www.vbforums.com/showthread.php?t=22694
http://www.ex-designz.net/apidetail.asp?api_id=499
http://www.xtremevbtalk.com/showthread.php?p=1313750
Upvotes: 2