|
Public Class Form1
Private InputHook As RawInputHook
Public Sub InputFromKeyboard(ByVal riHeader As RAWINPUTHEADER, ByVal riKeyboard As RAWKEYBOARD)
Dim s As String = ""
s = s & "MCode: 0x" & riKeyboard.MakeCode.ToString("X4")
s = s & " VKey: 0x" & riKeyboard.VKey.ToString("X4")
s = s & " Mssg: 0x" & riKeyboard.Message.ToString("X4")
s = s & " Flag: 0x" & riKeyboard.Flags.ToString("X4")
s = s & " Rsrvd: 0x" & riKeyboard.Reserved.ToString("X4")
s = s & " ExInf: 0x" & riKeyboard.ExtraInformation.ToString("X4")
s = s & " Devc: 0x" & riHeader.hDevice.ToString("X4")
s = s & " .Size: 0x" & riHeader.dwSize.ToString("X4")
s = s & " .Type: 0x" & riHeader.dwType.ToString("X4")
s = s & " wPara: 0x" & riHeader.wParam.ToString("X4")
s = s & Chr(13) & Chr(10)
System.Diagnostics.Debug.Write(s)
TextBox1.Text += s
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
InputHook = New RawInputHook()
AddHandler InputHook.OnRawInputFromKeyboard, AddressOf InputFromKeyboard
End Sub
End Class
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.