PC Review


Reply
Thread Tools Rate Thread

How to catch Enter-Key and send Tab-Key

 
 
Christian Herzog
Guest
Posts: n/a
 
      12th Dec 2006
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to catch the enter key of TestBox in datagrid mhw Microsoft C# .NET 7 15th Jul 2005 02:07 AM
How to catch ENTER between controls? =?Utf-8?B?T21hciBSb2phcw==?= Microsoft Dot NET Compact Framework 2 8th Mar 2005 05:43 PM
how to catch an ENTER in DataGrid =?Utf-8?B?T21hciBSb2phcw==?= Microsoft Dot NET Compact Framework 0 29th Dec 2004 10:01 PM
How does one send and catch external parameters to windows application Webgour Microsoft C# .NET 1 21st Jun 2004 03:15 PM
Default Button to Catch <ENTER> key JP Microsoft ASP .NET 2 25th Jul 2003 02:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:00 PM.