Hello Everyone
I have to use key down event on text box. Code for the event looks like this:
Private Sub TextBox1_Keydown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles textBox1.KeyDown
If e.KeyCode = keys.Enter Then
MessageBox.Show("Hello")
End If
End Sub
But it gives the following error:
Handles clause requires a WithEvents variable defined in the containing type
or one of its base types. (BC30506)
what does it mean? what i have to do for this?
Please help me out.
Thanks for your kind help.