VB编程题目,万分感谢,付分

2024-12-29 05:18:32
推荐回答(1个)
回答1:

Private Sub Command1_Click()
Static n As Integer
Dim kl As String
kl = Text1
If kl = "123" Then
MsgBox "欢迎使用本系统!"
Unload Me
ElseIf n = 2 Then
MsgBox "对不起,您无权使用。"
Unload Me
Else
MsgBox "对不起,口令错!"
n = n + 1
End If
End Sub

Private Sub Form_Load()
Text1.PasswordChar = "*"
End Sub