📄 16429.html
字号:
<html>
<head>
<title>Re: 请问要如何侦测有无安装何种输入法(如呒虾米)?</title>
</head>
<body bgcolor="#FFFFFF" vlink="#808080">
<center>
<h1>Re: 请问要如何侦测有无安装何种输入法(如呒虾米)?</h1>
</center>
<hr size=7 width=75%>
<hr size=7 width=75%><p>
Posted by 小v on July 31, 1999 at 09:46:38:<p>
In Reply to: <a href="16412.html">Re: 请问要如何侦测有无安装何种输入法(如呒虾米)?</a> posted by 阿志 on July 30, 1999 at 22:02:58:<p>
: 如题~<p>在FORM放一个ComboBox然后RUN以下程式:<p>Private Declare Function GetKeyboardLayoutList Lib "user32" _<br> (ByVal nBuff As Long, lpList As Long) As Long<br>Private Declare Function ImmGetDescription Lib "imm32.dll" _<br> Alias "ImmGetDescriptionA" (ByVal HKL As Long, _<br> ByVal lpsz As String, ByVal uBufLen As Long) As Long<br>Private Declare Function ImmIsIME Lib "imm32.dll" (ByVal HKL As Long) _<br> As Long<br>Private Declare Function ActivateKeyboardLayout Lib "user32" _<br> (ByVal HKL As Long, ByVal flags As Long) As Long<br>Private Declare Function GetKeyboardLayout Lib "user32" _<br> (ByVal dwLayout As Long) As Long<p>Private Sub Form_Load()<br>Dim No As Long, i As Long, j As Long, OLD As Long<br>Dim hKB(24) As Long, bufflen As Long<br>Dim buff As String, RetStr As String, RetCount As Long<br>buff = String(255, 0)<br>OLD = GetKeyboardLayout(0)<br>No = GetKeyboardLayoutList(25, hKB(0))<br>For i = 1 To No<br> If ImmIsIME(hKB(i - 1)) = 1 Then<br> bufflen = 255<br> RetCount = ImmGetDescription(hKB(i - 1), buff, bufflen)<br> RetStr = Left(buff, RetCount)<br> Combo1.AddItem RetStr<br> Else<br> RetStr = "English(American)"<br> Combo1.AddItem RetStr<br> End If<br> If hKB(i - 1) = OLD Then<br> Combo1.Text = RetStr<br> End If<br>Next<br>ActivateKeyboardLayout OLD, 0<br>End Sub<p>
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 16429-->
</ul><!--end: 16429-->
<br><hr size=7 width=75%><p>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -