by Ulysses R. Gotera (9 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB.NET
Difficulty: Unknown Difficulty
Originally Published: Sat 1st July 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)
C# - Upon pressing the enter key tabs to the next control
API Declarations
.Net Language: C#
The code is created in Visual Studio's IDE. Open your Visual Studio or a text editor and copy and paste the code below.
{
// **************************************************
// Description : If the user presses the enter key then
// the focus will be on the next tab index.
// Author : Ulysses R. Gotera
// Date Created: Sunday, January 08, 2006
// Country : Philippines
// **************************************************
//
if (e.KeyChar == (char)13)
SendKeys.Send("{TAB}");
}