[求助]关于用vb 开发系统问题
我想把以下两个窗体连上,可代码有问题,高手帮忙看看 上为窗体1,下为窗体2
窗体1 代码如下:
Public passwordkey As String
Public namekey As String
Public try_times As Integer
Private Sub Command1_Click()
Dim jh As Single
If txtuse = "" Then
MsgBox "输入用户名"
txtuse.SetFocus
Exit Sub
End If
If txtpwd = "" Then
MsgBox "输入密码"
txtpwd.SetFocus
Exit Sub
End If
namekey = MakeStr(txtuse)
passwordkey = MakeStr(txtpwd)
If myuser.in_db(namekey) = fals Then
MsgBox "用户名不存在"
try_times = try_times + 1
If try_times >= 3 Then
MsgBox “你已经三次尝试进入该系统,均不成功,系统将关闭"
dbapi_disconnect
End
Else
Exit Sub
End If
End If
myuser.getinfo (namekey)
If myuser.pwd <> passwordkey Then
MsgBox "密码错误"
try_times = try_times + 1
If try_times >= 3 Then
MsgBox "你已经三次尝试进入该系统,均不成功,系统将关闭"
dbapi_disconnect
End
Else
Exit Sub
End If
End If
If namekey = True Then
namekey = "111111"
End If
If passwordkey = True Then
passwordkey = "111111"
End If
If namekey = True And passwordkey = True Then
Form2.Show
End If
curuser.getinfo (myuser.username)
Unload Me
End Sub
Private Sub Command2_Click()
End
End Sub
请高手指教,小弟急,在线等 。。。。
哎 可惜不能上传图片, 其实 窗体1就是要输入 用户名和密码 才能进这个系统。窗体2就是 一个主系统窗体界面了,我的意思就是要输入正确用户名和密码后,连接进入窗体2
[此贴子已经被作者于2005-1-4 14:26:06编辑过]