Results 1 to 13 of 13

Thread: Change Windows Input Locale or Keyboard Layout Language

  1. #1

    Thread Starter
    ^:^...ANGEL...^:^ wrack's Avatar
    Join Date
    Mar 2002
    Location
    Melbourne, AUSTRALIA
    Posts
    2,695

    Change Windows Input Locale or Keyboard Layout Language

    Hey Guys

    I have a question regarding Windows Input Locale or Keyboard Layout Language or Language Bar.

    As you can see in the screen shot attached when I click on the BLUE button where the arrow points to it shows me a list of languages installed on my PC. I was wondering if there was a way to get that list of installed languages through API and show them in a listbox or something like that.

    Also I would like to change it programatically rather than clicking on the tray area and change it.

    The reason behind that is the user is using the application through Citrix and they can't directly access system tray while in Citrix so the only way to change something in Windows is through the application they are running.

    Hope this all make sense.

    Cheers
    Attached Images Attached Images  
    Last edited by wrack; Aug 2nd, 2006 at 09:00 PM. Reason: Adding more appropriate title

  2. #2
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: Change Windows Input Locale or Keyboard Layout Language

    you need EnumSystemLocales API. see this example by Randy Birch.
    Show Appreciation. Rate Posts.

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Change Windows Input Locale or Keyboard Layout Language

    Or run a VNC so the user can access the entire desktop, if that's allowable. (Citrix certainly allows it.)
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  4. #4

    Thread Starter
    ^:^...ANGEL...^:^ wrack's Avatar
    Join Date
    Mar 2002
    Location
    Melbourne, AUSTRALIA
    Posts
    2,695

    Re: Change Windows Input Locale or Keyboard Layout Language

    Quote Originally Posted by Harsh Gupta
    you need EnumSystemLocales API. see this example by Randy Birch.
    Thanks Harsh I will have a look at it

    So how do I pick one from a list and then set it using my program..?

  5. #5

    Thread Starter
    ^:^...ANGEL...^:^ wrack's Avatar
    Join Date
    Mar 2002
    Location
    Melbourne, AUSTRALIA
    Posts
    2,695

    Re: Change Windows Input Locale or Keyboard Layout Language

    Quote Originally Posted by Al42
    Or run a VNC so the user can access the entire desktop, if that's allowable. (Citrix certainly allows it.)
    I can't dictate how customer's IT department sets their security So VNC is not an options, Citrix is there and there is nothing I can do about it.

  6. #6
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: Change Windows Input Locale or Keyboard Layout Language

    Quote Originally Posted by wrack
    Thanks Harsh I will have a look at it

    So how do I pick one from a list and then set it using my program..?
    the only way i could think is setting the registry info.

    the example gives you all the details about a single language installed and in the registry, the settings are located at: "HKEY_CURRENT_USER\Control Panel\International", and in the right-pane, check the key "slanguage". you need to modify this key to change the language.

    but remember that playing with keys could be dangerous, and most people would not use your application if you play with registry. also, possibly what if you are trying to set a particular language which is not installed on client's machine??
    Show Appreciation. Rate Posts.

  7. #7

    Thread Starter
    ^:^...ANGEL...^:^ wrack's Avatar
    Join Date
    Mar 2002
    Location
    Melbourne, AUSTRALIA
    Posts
    2,695

    Re: Change Windows Input Locale or Keyboard Layout Language

    Yeah I have thought about the possibility where I try to install a language which is not installed on client machine but this is not one of those off the selve app u can buy.

    The client will have to have a setup we ask them or too bad for them and they are willing to do it aswell so hopefully it wont matter.

    The only thing I am not OK with is to change registry setting to change something of native windows functionality..! I was hoping to do this by using API since it's a much better implementation of exposed methods and properties.

    Guess I will have to do some more digging.

    Thanks for the help

  8. #8
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Change Windows Input Locale or Keyboard Layout Language

    the api may well change the registry anyway, most installed programs make some change to the registry during installation, of couse having permissions to do those things is as much a problem
    as long as you save the keys so they can be set back later all is well, unless the machine crashes, while your program is running
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  9. #9

    Thread Starter
    ^:^...ANGEL...^:^ wrack's Avatar
    Join Date
    Mar 2002
    Location
    Melbourne, AUSTRALIA
    Posts
    2,695

    Re: Change Windows Input Locale or Keyboard Layout Language

    Thanks

    True but APIs are hopefully very well tested while if I make a change on something where I don't know all the details my project manager will be very uncomfirtalble with that idea; same goes for me.

    I am going to do a little more research on if there is a way I can find out exactly what is being changed

  10. #10
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Change Windows Input Locale or Keyboard Layout Language

    there is a program called RegSnap (and others) that you can use to read the registry before and after doing something then it can compare the differences, keys added, deleted or changed
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  11. #11

    Thread Starter
    ^:^...ANGEL...^:^ wrack's Avatar
    Join Date
    Mar 2002
    Location
    Melbourne, AUSTRALIA
    Posts
    2,695

    Re: Change Windows Input Locale or Keyboard Layout Language

    I have been using RegMon but so far haven't been able to find the correct information. May be the filters I set were wrong.

  12. #12
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Change Windows Input Locale or Keyboard Layout Language

    regsnap has no filters, it just snapshot the regitry before and after

    just google it for plenty places to download
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  13. #13

    Thread Starter
    ^:^...ANGEL...^:^ wrack's Avatar
    Join Date
    Mar 2002
    Location
    Melbourne, AUSTRALIA
    Posts
    2,695

    Re: Change Windows Input Locale or Keyboard Layout Language

    Thanks

    I am gonna give it a go right now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width