用户名密码验证程序

来源:互联网 发布:大数据视频百度网盘 编辑:程序博客网 时间:2024/04/29 15:51
Option Explicit
Dim name1 As String
Dim password As String

Private Sub cmdquit_Click()
End
End Sub

Private Sub cmdsure_Click()
name1 
= "1"
password 
= "1"
If txtname.Text = name1 And txtpass.Text = password Then
MsgBox "Óû§ÃûÃÜÂëÕýÈ·"
Else
MsgBox "Óû§ÃûÃÜÂë´íÎó"
End If
End Sub

Private Sub txtname_Change()
cmdsure.Enabled 
= True
End Sub

Private Sub txtname_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 40 Then
txtpass.SetFocus
End If
End Sub

Private Sub txtpass_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 38 Then
txtname.SetFocus
End If
End Sub
原创粉丝点击