private void txtuser_Leave(object sender, EventArgs e) { //检查是否需要验证码 int state = qq.CheckVerify(txtuser.Text.Trim()); if (state == 3) { this.Text = "检测到需要验证码。"; pic_verify.Image = qq.getCapture(); } else if (state == 2) { MessageBox.Show("获取验证码出现错误!请重新打开本程序!"); } else if (state == 1) { this.Text = "检测到不需要验证码。"; } }