Ver Mensaje Individual
  #3 (permalink)  
Antiguo 13/11/2011, 16:00
way2park
 
Fecha de Ingreso: mayo-2008
Mensajes: 224
Antigüedad: 15 años, 11 meses
Puntos: 4
Respuesta: vb6 idiomas teclado

Hola A.H.H

Te cuento, probe con el codigo como me pasastes y al verdad no me funciono, encontre esto:

Código HTML:
'This fucntion changes the locale and as a result, the keyboardlayout gets adjusted

'parameters for api's
Const KL_NAMELENGTH As Long = 9 'length of the keyboardbuffer
Const KLF_ACTIVATE As Long = &H1 'activate the layout

'the language constants
Const LANG_NL_STD As String = "00000413"
Const LANG_EN_US As String = "00000409"
Const LANG_DU_STD As String = "00000407"
Const LANG_FR_STD As String = "0000040C"

'api's to adjust the keyboardlayout
Private Declare Function GetKeyboardLayoutName Lib "user32" Alias "GetKeyboardLayoutNameA" (ByVal pwszKLID As String) As Long
Private Declare Function LoadKeyboardLayout Lib "user32" Alias "LoadKeyboardLayoutA" (ByVal pwszKLID As String, ByVal flags As Long) As Long

Public Function SetKbLayout(strLocaleId As String) As Boolean
'Changes the KeyboardLayout
'Returns TRUE when the KeyboardLayout was adjusted properly, FALSE otherwise
'If the KeyboardLayout isn't installed, this function will install it for you
On Error Resume Next
Dim strLocId As String 'used to retrieve current KeyboardLayout
Dim strMsg As String 'used as buffer
Dim lngErrNr As Long 'receives the API-error number

'create a buffer
strLocId = String(KL_NAMELENGTH, 0)
'retrieve the current KeyboardLayout
GetKeyboardLayoutName strLocId
'Check whether the current KeyboardLayout and the
'new one are the same
If strLocId = (strLocaleId & Chr(0)) Then
'If they're the same, we return immediately
SetKbLayout = True
Else
'create buffer
strLocId = String(KL_NAMELENGTH, 0)
'load and activate the layout for the current thread
strLocId = LoadKeyboardLayout((strLocaleId & Chr(0)), KLF_ACTIVATE)
If IsNull(strLocId) Then 'returns NULL when it fails
SetKbLayout = False
Else 'check again
'create buffer
strLocId = String(KL_NAMELENGTH, 0)
'retrieve the current layout
GetKeyboardLayoutName strLocId
If strLocId = (strLocaleId & Chr(0)) Then
SetKbLayout = True
Else
SetKbLayout = False
End If
End If
End If
End Function

Private Sub Form_Load()
'change the current keybour layout to 'English - US'
SetKbLayout LANG_EN_US
End Sub
Que me funciono barbaro. Los numeros de los idiomas los encontre en el regedit.
Pero ete aqui que me surgio otro inconveniente.

En tiempo de ejecucion, el teclado cambia el idioma sin problemas, pero el textbox no se inmuta del cambio, es como que no entiende de que hablo, pero el Chino, Coreano y Japones, me lo trabaja sin problemas.
Los idiomas con los que tengo inconveniente es con el Arabe el Hindu y el Griego
Busque y rebusque y no logro encontrarle la vuelta. No soy un genio en esto y es evidente de que me estoy olvidando de algo.
Si abro el block de notas me escribe sin problemas en todos los idiomas, pero con el textobx del visual no. Probe cambiando las fuentes por fuentes TruType y las otras y nada.
Yo no quiero cambiar todo el sistema operativo solo que los textbox me permitan ingresar texto en estos idiomas

Tenes alguna idea de que estoy dejando de lado?

Desde ya te agradesco el codigo que me pasastes, que la verdad no encontraba nada, gracias gracias gracias !!!!