E
Enrico Pavesi
I create a class like this
Public Class KeyFilter
Implements IMessageFilter
Overridable Function PreFilterMessage(ByRef m As
Microsoft.WindowsCE.Forms.Message) As Boolean Implements
IMessageFilter.PreFilterMessage
Dim tasto As Integer
Select Case m.Msg
Case 786
tasto = m.WParam.ToInt32()
Select Case (tasto)
Case 193 To 196
Return True
End Select
End Select
Return False
End Function
End Class
then in the main form
InitializeComponent()
Dim Filtro As KeyFilter = New KeyFilter
ApplicationEx.AddMessageFilter(Filtro)
But this code does not trap the virtual hardware key
The same in a test C# project works.
Do someone knows why it does not work?
Thanks
Public Class KeyFilter
Implements IMessageFilter
Overridable Function PreFilterMessage(ByRef m As
Microsoft.WindowsCE.Forms.Message) As Boolean Implements
IMessageFilter.PreFilterMessage
Dim tasto As Integer
Select Case m.Msg
Case 786
tasto = m.WParam.ToInt32()
Select Case (tasto)
Case 193 To 196
Return True
End Select
End Select
Return False
End Function
End Class
then in the main form
InitializeComponent()
Dim Filtro As KeyFilter = New KeyFilter
ApplicationEx.AddMessageFilter(Filtro)
But this code does not trap the virtual hardware key
The same in a test C# project works.
Do someone knows why it does not work?
Thanks