TheSwamp
Code Red => VB(A) => Topic started by: dussla on May 08, 2012, 04:29:43 AM
-
i am korean
in my work , all command is englsih
but after making new layer name , i foget to change english kebyoard button in many times
so i would like to make always english command input lsp
can you understand my words ?
like this http://www.cadtutor.net/forum/showthread.php?66262-wanted-vb-code-to-vlisp-migration
but work not ~ erromessage : user32.dll loadkeyboardlayout (00000409 1) excute erro
-
i found this but i have to change vlisp lang
help me pls
Option Explicit
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Declare Function ActivateKeyboardLayout Lib "user32" ( _
ByVal HKL As Long, _
ByVal Flags As Long) As Long
Private Declare Function GetKeyboardLayout Lib "user32" ( _
ByVal dwLayout As Long) As Long
Private Declare Function GetKeyboardLayoutName Lib "user32" Alias "GetKeyboardLayoutNameA" ( _
ByVal pwszKLID As String) As Long
Private Const SPIF_SENDWININICHANGE = &H2
Private Const SPI_SETDEFAULTINPUTLANG = 90
Const HKL = "00000409"
Private Sub Command1_Click()
Dim retval As Long
retval = SystemParametersInfo(SPI_SETDEFAULTINPUTLANG, 0, HKL, SPIF_SENDWININICHANGE)
ActivateKeyboardLayout retval, 0
End Sub
-
AutoLisp does not have a way to link to external DLL functions. The only thing you can use is ActiveX/COM interfaces.
Perhaps try this: http://translate.google.co.za/translate?hl=en&sl=auto&tl=en&u=http%3A%2F%2Fwww.script-coding.com%2Fdynwrap.html
At the bottom of that page is an example of using the user32.dll --> ActiveKeyboardLayout through an ActiveX call to DynWrap.