Народ, очень нужна хелпа с функцией GetKeyNameText
У кого есть примерчик или описание работы функции - киньте плиз.
Очень нужно.
Option Explicit
Private Declare Function GetKeyNameText Lib "user32.dll" Alias "GetKeyNameTextA" (ByVal lParam As Long, ByVal lpBuffer As String, ByVal nSize As Long) As Long
Private Declare Function MapVirtualKey Lib "user32.dll" Alias "MapVirtualKeyA" (ByVal wCode As Long, ByVal wMapType As Long) As Long
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Dim s As String
s = String$(50, 0)
Me.Print Left$(s, GetKeyNameText(MapVirtualKey(KeyCode, 0) * &H10000, s, Len(s)))
End Sub
Private Sub Form_Load()
Me.AutoRedraw = True
End Sub
Option Explicit
Private Declare Function GetKeyNameText Lib "user32.dll" Alias "GetKeyNameTextW" (ByVal lParam As Long, ByVal lpBuffer As Long, ByVal nSize As Long) As Long
Private Declare Function MapVirtualKey Lib "user32.dll" Alias "MapVirtualKeyW" (ByVal wCode As Long, ByVal wMapType As Long) As Long
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Dim s As String
s = String$(50, 0)
Me.Print Left$(s, GetKeyNameText(MapVirtualKey(KeyCode, 0) * &H10000, StrPtr(s), Len(s)))
End Sub
Private Sub Form_Load()
Me.AutoRedraw = True
End Sub
Сейчас этот форум просматривают: Google-бот и гости: 154