Input Languge

  • Thread starter Thread starter Muhammad Bilal
  • Start date Start date
Hi.
How Input language and Keyboard layout/IME can be changed at runtime.
Hi MD
take a look at this posting intiated by me a couple of fays ago....
http://groups.google.com/group/micr...7e636cb9ffe/807505c99cf163a2#807505c99cf163a2

this code, assuming you have a textbox works when the box receives
focus.
Of course you must have the wanted locallanguage installed.
Private Sub TextBox1_GotFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles TextBox1.GotFocus
'This works as long as another language is installed and in
use
Dim x As New System.Globalization.CultureInfo("el-GR") 'which
is Greek
InputLanguage.CurrentInputLanguage =
InputLanguage.FromCulture(x)
End Sub

Private Sub TextBox1_LostFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles TextBox1.LostFocus
Dim x As New System.Globalization.CultureInfo("sv-SE")' Which
is Swedish
InputLanguage.CurrentInputLanguage =
InputLanguage.FromCulture(x)
End Sub

Have also a look at the input language class at MSDN, at
http://msdn2.microsoft.com/en-us/library/system.windows.forms.inputlanguage(VS.71).aspx
and also this page with all cultureinfo settings, at
http://msdn2.microsoft.com/en-us/library/system.globalization.cultureinfo(VS.71).aspx

best regards
lexj
 
Hi
Thankx for ur help.
Dim x As New System.Globalization.CultureInfo(&H420)
InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(x)

I changed the language with this code to "Urdu". it changed the langusge but
the problem is this that there are various types of keyboard layouts in Urdu
language. Now language is changed but how can i change the keyboard layout as
they are installed in windows and can be changed from regional setting but
how can it be changed from the code.

Regards
Muhammad Bilal
 
Back
Top