可能重复: 如何使用vb6检查当前键盘的语言?
如何检查当前键盘的语言使用VB 6总是时间?
Private Sub Timer1_Timer()
IF (language = EN) Then
label1.caption = EN
else ......
End IF
End Sub发布于 2012-05-22 13:47:55
使用WMI,它可以非常容易地完成:
函数
Public Function GetPropValue(PropName$) As String
Dim result$
result = ""
Set WMIObjectSet = GetObject("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT *FROM Win32_OperatingSystem")
For Each WMIObject In WMIObjectSet
If result <> "" Then
Exit For
Else
For Each WMIProperty In WMIObject.Properties_
If WMIProperty.Name = PropName Then
result = WMIProperty.Value
Exit For
End If
Next
End If
Next
GetPropValue = result
End Function可以被称为:
GetPropValue("OSLanguage")
1033现在,它必须检查代码页编号的值。有关详细信息,请访问这里。
或
Private Declare Function GetThreadLocale Lib "kernel32" () As Long
Private Sub Timer1_Timer()
IF (GetThreadLocale = 1033) Then
label1.caption="EN"
else
'check other values
End IF
End Subhttps://stackoverflow.com/questions/10702817
复制相似问题