【VB开源代码栏目提醒】:网学会员为需要VB开源代码的朋友们搜集整理了4.5.frm相关资料,希望对各位网友有所帮助!
VERSION 5.00
Begin VB.Form Form24
Caption = "Form24"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form24"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 2640
TabIndex = 3
Top = 1920
Width = 855
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 495
Left = 960
TabIndex = 2
Top = 1920
Width = 855
End
Begin VB.TextBox Text1
Height = 375
IMEMode = 3 'DISABLE
Left = 1320
PasswordChar = "*"
TabIndex = 1
Text = "Text1"
Top = 960
Width = 1695
End
Begin
VB.Label Label1
Caption = "请输入密码:"
ForeColor = &H000000FF&
Height = 495
Left = 600
TabIndex = 0
Top = 240
Width = 1215
End
End
Attribute VB_Name = "Form24"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer
'定义i为模块级变量,用于计数
Private Sub Command1_Click()
Dim Password As String
Dim pwd As String
Dim i As Integer
Pass
word = "123456"
pwd = Trim(Text1.Text)
If Password <> pwd Then
MsgBox "密码输入不正确!", , "提示"
i = i + 1
'输入错误次数加1
If i = 3 Then
MsgBox "三次密码输入错误,强行退出!", vbCritical, "提示"
End
End If
Else
MsgBox "输入正确!", , "提示"
End If
End Sub
Private Sub Command2_Click()
End
End Sub