首页上一页 1 下一页尾页 1 条记录 1/1页
在代码窗口中编写代码,请问下那些代码是如何获取的呀?
发表在VB答疑区
2010-03-04
是否精华
是
否
版块置顶:
是
否
Option Explicit
Public intMyTimes As Integer
Const MaxTimes As Integer = 3
Private Sub Form_Load()
intMyTimes = 1
cboUserName.AddItem "管理员"
cboUserName.AddItem "操作员1"
cboUserName.AddItem "操作员2"
End Sub
Private Sub cmdOK_Click()
If cboUserName.Text <> "" Then
If txtPassword.Text = "" Then
MsgBox "请输入密码!", , "提示窗口"
txtPassword.SetFocus
Else
If txtPassword.Text <> "11" Then
If intMyTimes > MaxTimes Then
MsgBox "您无权使用该软件!", , "提示窗口"
End
Else
intMyTimes = intMyTimes + 1
MsgBox "密码不正确,请重新输入!", , "提示窗口"
txtPassword.SetFocus
End If
Else
MsgBox "登录成功!", , "提示窗口"
End If
End If
Else
MsgBox "操作员不能为空!", , "提示窗口"
Exit Sub
End If
End Sub
Private Sub cmdCancel_Click()
End
End Sub
Private Sub txtPassword_Change()
End Sub
[font color=#FF0000]请问下这些编写出来的代码都是怎么获取的呀?谢谢![/font]
Public intMyTimes As Integer
Const MaxTimes As Integer = 3
Private Sub Form_Load()
intMyTimes = 1
cboUserName.AddItem "管理员"
cboUserName.AddItem "操作员1"
cboUserName.AddItem "操作员2"
End Sub
Private Sub cmdOK_Click()
If cboUserName.Text <> "" Then
If txtPassword.Text = "" Then
MsgBox "请输入密码!", , "提示窗口"
txtPassword.SetFocus
Else
If txtPassword.Text <> "11" Then
If intMyTimes > MaxTimes Then
MsgBox "您无权使用该软件!", , "提示窗口"
End
Else
intMyTimes = intMyTimes + 1
MsgBox "密码不正确,请重新输入!", , "提示窗口"
txtPassword.SetFocus
End If
Else
MsgBox "登录成功!", , "提示窗口"
End If
End If
Else
MsgBox "操作员不能为空!", , "提示窗口"
Exit Sub
End If
End Sub
Private Sub cmdCancel_Click()
End
End Sub
Private Sub txtPassword_Change()
End Sub
[font color=#FF0000]请问下这些编写出来的代码都是怎么获取的呀?谢谢![/font]