if (temDR.HasRows)
{
temDR.Read();
string str = temDR[3].ToString();
LinkDB.DBhelper.My_con.Close();
LinkDB.DBhelper.My_con.Dispose();
F_Main FMain = new F_Main(textName.Text, str);
this.Hide();
FMain.ShowDialog();
FMain.Dispose();
this.Close();
}
else
{
MessageBox.Show("用户名或密码错误!请重新输入", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
textName.Text = "";
textPass.Text = "";
}
MyClass.con_close();
}
catch (Exception ee)
{
MessageBox.Show(ee.Message.ToString());
}
本模块还可以通过按Enter键进行移动鼠标焦点。相关代码如下:
private void textName_KeyPress(object sender, KeyPressEventArgs e)
{毕业论文http://www.751com.cn/
if (e.KeyChar == '\r')
{
this.textPass.Focus();
}原文请+QQ3249,114辣.文^论,文'网
}
private void textPass_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r')
{
this.butLogin.Focus();
上一页 [1] [2] [3] [4] [5] [6] [7] [8]