INTRODUCTION TO SECURITY GETTING A PIN Dim m_intAttempts As Integer = 0 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load GroupBox1.Visible = False End Sub Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGo.Click '---if blank then bail If Len(txtPIN.Text) < 1 Then Exit Sub Dim strPin As String strPin = Trim(txtPIN.Text) If strPin = "123" Then GroupBox1.Visible = True Else txtPIN.Clear() txtPIN.Focus() m_intAttempts += 1 If m_intAttempts = 3 Then MessageBox.Show("You are a crook", "Ron's Stop & Rob", MessageBoxButtons.OK, MessageBoxIcon.Stop) End End If End If End Class