WinForm编程中 Enter自动登录设置 //Form窗体中的 KeyPreview = ture; AcceptButton = ButLogin; // ButLogin== Enter控件ID名 //ok了