Keys.Enter

  • Thread starter Thread starter a
  • Start date Start date
A

a

what should i do to prevent enter key from work i do that in prive sub

but i need cancel the event

what is the code i need?

Private Sub TextBox1_KeyDown(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown

If e.KeyCode = Keys.Enter Then

' the code to canel enter from work what i need thank you

End If

End Sub
 
I think e should have an handled property. You just need to set it to
true.

See if it works.

Cheers!
Cyril Gupta
 
Back
Top