Author Topic: always englsih command input  (Read 2797 times)

0 Members and 1 Guest are viewing this topic.

dussla

  • Bull Frog
  • Posts: 265
always englsih command input
« 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
« Last Edit: May 08, 2012, 05:55:07 AM by dussla »

dussla

  • Bull Frog
  • Posts: 265
Re: always englsih command input
« Reply #1 on: May 09, 2012, 12:22:46 AM »
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

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: always englsih command input
« Reply #2 on: May 14, 2012, 08:25:30 AM »
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.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.