TextBox回车失去焦点

    private void textBox_KeyDown(object sender, KeyEventArgs e)
    {
        if(e.KeyCode == Keys.Enter)
        {
            this.ActiveControl = label1;                        //this is Form object
        }
    }

你可能感兴趣的:(c#,回车,焦点)