我是一个标准的VB新手,马上就要毕业答辩了。可我要作的晶圆厚度测量控制软件还没有什么进展,求求各位帮帮小弟了。感激不尽。感激不尽。下面是我写得,不知道错在哪里了。大侠们指点指点。
Private Sub Command1_Click()
ncount = ncount + 1
If nount < 1 Then
If textl = "12345678" Then
Unload Me
Form3.Show
Else
Label2.Caption = "密码不正确,请重新输入”"
Text1.Text = " "
Text1.SetFocus
End If
Else
MsgBox "密码输入不能超过三次,按确定将退出系统“,vbDefaultButtonl,"退出系统”
End
End If
End SubPrivate Sub Form_Load()
Text1.PasswordChar = "*"
Label2.AutoSize = True
End Sub
Private Sub Command1_Click()
ncount = ncount + 1
If nount < 1 Then
If textl = "12345678" Then
Unload Me
Form3.Show
Else
Label2.Caption = "密码不正确,请重新输入”"
Text1.Text = " "
Text1.SetFocus
End If
Else
MsgBox "密码输入不能超过三次,按确定将退出系统“,vbDefaultButtonl,"退出系统”
End
End If
End SubPrivate Sub Form_Load()
Text1.PasswordChar = "*"
Label2.AutoSize = True
End Sub
*****************************************************************************
欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码)
http://feiyun0112.cnblogs.com/
ncount = ncount + 1
If ncount < 3 Then
If Text1.Text = "12345678" Then
Unload Me
Form3.Show
Else
Label2.Caption = "密码不正确,请重新输入"
Text1.Text = " "
Text1.SetFocus
End If
Else
MsgBox "密码输入不能超过三次,按确定将退出系统",vbDefaultButtonl,"退出系统"
End
End If
第二次 ncount 值为2
第三次 ncount 值为3自己好好想想吧~~~PS:我没睡醒的~~~