i want to show messagebox by press enter on commandbardropdownlist, i use this code:
Private Sub CommandBarDropDownList1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles CommandBarDropDownList1.KeyDown
If e.KeyCode = Keys.Enter Then
MsgBox("hello", MsgBoxStyle.OkOnly)
End If
End Sub
but when i run it, there is nothing happened, is there something wrong with my code?
Thanks
Private Sub CommandBarDropDownList1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles CommandBarDropDownList1.KeyDown
If e.KeyCode = Keys.Enter Then
MsgBox("hello", MsgBoxStyle.OkOnly)
End If
End Sub
but when i run it, there is nothing happened, is there something wrong with my code?
Thanks