Vb.net 有人知道这个问题的解决办法吗?
你还没有说明这个问题。但是,只要阅读代码,就可以使用count(),它将变量count作为函数调用。此外,计数从未定义。请尝试:Vb.net 有人知道这个问题的解决办法吗?,vb.net,vb.net-2010,Vb.net,Vb.net 2010,你还没有说明这个问题。但是,只要阅读代码,就可以使用count(),它将变量count作为函数调用。此外,计数从未定义。请尝试: Private Sub Btnlog_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnlog.Click If txtuser.Text = "Manish" And txtpw.Text = "Nair" Then Me
Private Sub Btnlog_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnlog.Click
If txtuser.Text = "Manish" And txtpw.Text = "Nair" Then
MessageBox.Show("welcome")
Else
MessageBox.Show("Try again")
count= count() + 1
If count = 3 Then
Me.Close()
End If
End If
End Sub
Private Sub Btnlog_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnlog.Click
dim count as integer = 0 ' Define count
If txtuser.Text = "Manish" And txtpw.Text = "Nair" Then
MessageBox.Show("welcome")
Else
MessageBox.Show("Try again")
count = count + 1
If count = 3 Then
Me.Close()
End If
End If
End Sub