private void tbSite_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar==13)
            {
                MessageBox.Show("你按了回车键");
            }
        }


本文转载:CSDN博客