Get an ATM pin number and give them 3 chances private: System::Void btnOK_Click(System::Object^ sender, System::EventArgs^ e) { Reset(); String^ securityCode = "ron"; String^ customerPIN = txtPIN->Text->ToLower(); if (securityCode == customerPIN) { MessageBox::Show("Welcome to Ron's ATM!", "Ron's ATM", MessageBoxButtons::OK, MessageBoxIcon::Information); lbAnswer->Items->Add("Welcome " + securityCode); } else { Count++; if (Count > 3) { MessageBox::Show("You are a crook. We are keeping your card!", "Ron's ATM", MessageBoxButtons::OK, MessageBoxIcon::Error); this->Close(); } else { MessageBox::Show("That is an incorrect PIN", "Ron's ATM", MessageBoxButtons::OK, MessageBoxIcon::Error); txtPIN->Clear(); txtPIN->Focus(); } } ShowCode("ATM.txt");