How to catch Enter-Key and send Tab-Key
- From: Christian Herzog <herzog@xxxxxxxxxx>
- Date: Tue, 12 Dec 2006 10:29:03 +0100
Hello!
I need a simple method to catch the Key-Down-Event, check if the Enter key is pressed and send the Tab-Key.
Public Class Form> ...
> ...
Private Sub Form_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown> ...
If e.KeyCode = Windows.Forms.Keys.Enter Then
e.Handled = True
System.Windows.Forms.SendKeys.Send("{TAB}")
End If
End Sub
> ...
End Class
This Sample works for TextBoxes, but not for buttons. The Button_Clicked-Event raised always.
I also try to insert the code directly into the Button-Code - without success.
How to solve this problem?
Thank you,
Christian
.
- Prev by Date: Re: Handling link clicks in a DataGridViewLinkColumn
- Next by Date: How to know the nstall source for ClickOnce
- Previous by thread: maskedtextbox retreive data
- Next by thread: How to know the nstall source for ClickOnce
- Index(es):