Это мой код:
Код: Выделить всё
namespace PasswordManager
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void EnterPressed(object sender, KeyEventArgs e)
{
if (textBox1.Text != "" && e.KeyCode == Keys.Enter) // if Enter is pressed
{
Action();
}
}
private void Action()
{
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/789 ... rp-textbox
Мобильная версия