I have this sample code for a single-page Winforms Application
I would like to re-use this in a console Application
Sample code:
Protected Overrides Sub WndProc(ByRef msg As Message)
If (msg.Msg = SGFPMMessages.DEV_AUTOONEVENT) Then
If (msg.WParam.ToInt32() = SGFPMAutoOnEvent.FINGER_ON) Then
StatusBar.Text = "Device Message: Finger On"
ElseIf (msg.WParam.ToInt32() = SGFPMAutoOnEvent.FINGER_OFF) Then
StatusBar.Text = "Device Message: Finger Off"
End If
End If
MyBase.WndProc(msg)
End Sub
My Attempt:
Imports System.Windows.Forms
Sub WndProc(ByRef msg As Message)
If (msg.Msg = SGFPMMessages.DEV_AUTOONEVENT) Then
If (msg.WParam.ToInt32() = SGFPMAutoOnEvent.FINGER_ON) Then
Console.Title = "Device Message: Finger On"
ElseIf (msg.WParam.ToInt32() = SGFPMAutoOnEvent.FINGER_OFF) Then
Console.Title = "Device Message: Finger Off"
End If
End If
//MyBase.WndProc(msg)
End Sub