Good Day:
I am creating a WinForms application using VS.NET 2005 and VB.NET 2005. I need to determine whether the user key pressed B or S in the combo box called cboType. I get an error message that reads: Cannot handle event keydown because they do not have the same signature. I tried the following and get the same error.
Private Sub cboType_KeyDown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboType.KeyDown
If e.KeyValue=keys.B then
'Do Something
End sub
Private Sub cboType_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cboType.KeyPress
If e.KeyValuee=keys.S then
'Do Something
End Sub
Any Suggestions?
Thank You,
Denise
Private Sub ComboBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 66 Then
MsgBox "Key B pressed"
End If
End Sub