i'm trying to include the hardware buttons control posted by
mastermind at
http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=283&SearchTerms=hardware,buttons
in my vb.net project, but am having some trouble converting the
author's c# example to vb.net. particularly with creating the events.
here is what i have, and the errors i am getting
any help appreciated
captureHButtons = New CaptureHButtonsControl.CaptureHButtons
'//
'// captureHButtons
'//
'tried to convert this line to vb.net:
' this.captureHButtons.BindedButtonPressed += new
CaptureHButtonsControl.CaptureHButtons.KeyUpEventHandler(this.captureButtons_BindedButtonPressed);
'next line gives the following error:
' Public Event BindedButtonPressed(KeyCode As Integer)' is an event,
' and cannot be called directly.
' Use a 'RaiseEvent' statement to raise an event.
' and
' CaptureHButtonsControl.CaptureHButtons.CapturedButtonEventHandler'
is a delegate type.
' Delegate construction permits only a single AddressOf expression as
an argument list.
' Often an AddressOf expression can be used instead of a delegate
construction.
Me.captureHButtons.BindedButtonPressed += New
CaptureHButtonsControl.CaptureHButtons.CapturedButtonEventHandler(Me.captureButtons_BindedButtonPressed)
'tried to convert this line to vb.net:
' this.captureHButtons.RegisteredButtonPressed += new
CaptureHButtonsControl.CaptureHButtons.CapturedButtonEventHandler(this.captureButtons_RegisteredButtonPressed);
'next line gives the following error:
' Public Event BindedButtonPressed(KeyCode As Integer)' is an event,
' and cannot be called directly.
' Use a 'RaiseEvent' statement to raise an event.
' and
' CaptureHButtonsControl.CaptureHButtons.CapturedButtonEventHandler'
is a delegate type.
' Delegate construction permits only a single AddressOf expression as
an argument list.
' Often an AddressOf expression can be used instead of a delegate
construction.
Me.captureHButtons.RegisteredButtonPressed += New
CaptureHButtonsControl.CaptureHButtons.CapturedButtonEventHandler(Me.captureButtons_RegisteredButtonPressed)