vb登陆程序源代码\x0d\x0a\x0d\x0a你可以这样做建一个模块在里面输入下列\x0d\x0aPublic conn As ADODB.Connection\x0d\x0aSub main()\x0d\x0aSet conn = New ADODB.Connection\x0d\x0a conn.ConnectionString = "Provider=SQLOLEDB.1Persist Security Info=False" _\x0d\x0a + "User ID=sapassword=saInitial Catalog=您的数据库名Data Source=127.0.0.1"\x0d\x0aconn.Open\x0d\x0afrom1.Show ’登录
界面\x0d\x0aEnd Sub\x0d\x0a\x0d\x0a再在登录界面“确定”下写入如下代码:\x0d\x0aPrivate Sub Command1_Click()\x0d\x0a If id.Text = "" Then\x0d\x0aMsgBox "用户名不能为空!", vbOKOnly + vbInformation, "友情提示"\x0d\x0aid.SetFocus\x0d\x0aExit Sub\x0d\x0aEnd If\x0d\x0aIf password.Text = "" Then\x0d\x0aMsgBox "密码不能为空!", vbOKOnly + vbInformation, "友情提示"\x0d\x0apassword.SetFocus\x0d\x0aExit Sub\x0d\x0aEnd If\x0d\x0a\x0d\x0aDim strSQl As String\x0d\x0astrSQl = "select * from Users where users_name='" &Trim$(id.Text) &"' and password='" &Trim$(password.Text) &"' "\x0d\x0a\x0d\x0aDim str As New ADODB.Recordset\x0d\x0aSet str = New ADODB.Recordset\x0d\x0astr.CursorLocation = adUseClient\x0d\x0astr.Open strSQl, conn, adOpenStatic, adLockReadOnly\x0d\x0a\x0d\x0aWith str\x0d\x0aIf .State = adStateOpen Then .Close\x0d\x0a.Open strSQl\x0d\x0aIf .EOF Then\x0d\x0aTry_times = Try_times + 1\x0d\x0aIf Try_times >= 3 Then\x0d\x0aMsgBox "您已经三次尝试进入本系统,均不成功,系统将自动关闭", vbOKOnly + vbCritical, "警告"\x0d\x0aUnload Me\x0d\x0aElse\x0d\x0aMsgBox "对不起,用户名不存在或密码错误 !", vbOKOnly + vbQuestion, "警告"\x0d\x0aid.SetFocus\x0d\x0aid.Text = ""\x0d\x0apassword.Text = ""\x0d\x0aEnd If\x0d\x0aElse\x0d\x0a\x0d\x0aUnload Me\x0d\x0a\x0d\x0a Form2.Show’登录进入的另一个界面\x0d\x0a\x0d\x0aEnd If\x0d\x0aEnd With\x0d\x0a\x0d\x0aEnd Subvoid student::print()
{
char s[10]
int i=0
string password="guest"
cout<<endl<<endl<<endl
cout<<"\t\t**************************************\n"
cout<<"\t\t***** 学生信息管理系统 *****\n"
cout<<"\t\t**************************************\n"
cout<<"\t\t请输入密码(7位数):"
s[0]=getch()
while(s[i]!='\r') //输入回车键停止
{
cout<<"*"
s[++i]=getch()
}
s[i]='\0'
cout<<endl
if(s==password)
cout<<"\t\t欢迎使用学生信息管理系统!\n"
else
{
cout<<"\t\t您输入的密码有误!无权使用\n"
exit(0)
}
system("cls")
}
传奇登陆器vb
源码在18183传奇频道。根据查询相关信息,
传奇登陆器vb源码18183是唯一的登录频道,传奇登陆器vb源码数据管理器版本2.0本程序属于免费软件,可以任意的传播与使用,所以传奇登陆器vb源码在18183传奇频道。
评论列表(0条)