以下是引用csyx在2023-1-14 12:48:01的发言:
我这是没问题
我这是没问题
你的是切换输入法,当切换到ENG键盘布局时,想再按快捷键输入中文可能不太方便了。
我的是切换开关“中”“英”输入法状态。就是输入密码等地方自动切换到“英”,输入品名等需要输入汉字的地方,自动切换到“中”
2个不一样。
[此贴子已经被作者于2023-1-14 13:44编辑过]
DECLARE long EnumEnabledLayoutOrTip IN input string@,string@,string@,string@,long DECLARE long InstallLayoutOrTip IN input string,long of = CREATEOBJECT("form1") of.show(1) RETURN DEFINE CLASS form1 as Form width=520 height=280 AllowOutput=0 AutoCenter=1 ADD OBJECT label1 as label WITH left=10,top=10,autosize=1,caption="KLID or TIP profile for string" ADD OBJECT idList as listbox WITH left=10,top=30,width=600,height=200,MultiSelect=1 ADD OBJECT cmd as commandbutton WITH left=10,top=240,width=60,height=24,caption="确定" ADD OBJECT label2 as label WITH left=70,top=246,autosize=1,caption="(输入法选择,选定启用的ID,未选的禁用)" PROCEDURE init aCount = EnumEnabledLayoutOrTip(NULL, NULL, NULL, NULL, 0) lotp = REPLICATE(0h00, aCount*584) aCount = EnumEnabledLayoutOrTip(NULL, NULL, NULL, @lotp, LEN(lotp)) j = 1 FOR i=1 TO aCount id = STRCONV(SUBSTR(lotp,j+64,260), 6) id = LEFT(id, AT(0h00,id)-1) this.idList.AddItem(id) j = j + 584 ENDFOR this.idList.ListIndex = 1 ENDPROC PROCEDURE Destroy FOR i=1 TO thisform.idList.listcount InstallLayoutOrTip(STRCONV(thisform.idList.List(i)+0h00,5), 2) ENDFOR ENDPROC PROCEDURE cmd.click FOR i=1 TO thisform.idList.listcount nFlags = IIF(thisform.idList.Selected(i), 2, 1) InstallLayoutOrTip(STRCONV(thisform.idList.List(i)+0h00,5), nFlags) ENDFOR ENDPROC ENDDEFINE