我是一个标准的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

解决方案 »

  1.   

    If nount < 1 Then 应该是 If nount >3 Then 
      
    *****************************************************************************
    欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码) 
    http://feiyun0112.cnblogs.com/
      

  2.   


        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
      

  3.   

    应该是If nount < 4 Then 吧第一次 ncount 值为1
    第二次 ncount 值为2
    第三次 ncount 值为3自己好好想想吧~~~PS:我没睡醒的~~~
      

  4.   

    谢谢各位大侠了。我还问一下在VB中MSComm控件具体是怎么操作的。
      

  5.   

    麻烦帮忙说一下在VB中MSComm控件具体是怎么操作的,我要用PC后面的九针的接口。再问一下怎样在VB的TEXT显示外接设备的数据。