如何检查当前键盘';用VB6的s语言总是时间?

如何检查当前键盘';用VB6的s语言总是时间?,vb6,Vb6,可能重复: 如何使用VB6随时检查当前键盘的语言 Private Sub Timer1_Timer() IF (language = EN) Then label1.caption = EN else ...... End IF End Sub 使用WMI可以非常轻松地完成: 功能 现在,它必须用代码页码检查值。详情请访问 或 Public Function GetPropValue(PropName$) As String Dim result$ result =

可能重复:

如何使用VB6随时检查当前键盘的语言

Private Sub Timer1_Timer() 
IF (language = EN) Then 
label1.caption = EN 
else ...... 
End IF
End Sub

使用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 Sub