rendered paste body private: System::Void Text1_KeyPress(System::Object^ sender, System::Windows::Forms::KeyPressEventArgs^ e) { short KeyAscii = e->KeyChar; if (KeyAscii < 48 || KeyAscii > 57) { if (KeyAscii != 8 && KeyAscii != 13 && KeyAscii != VK_LEFT) { KeyAscii = 0; } else if (KeyAscii == 13) { this->Button3_Click(sender, e); } else if (KeyAscii == VK_LEFT) { int tem = (int)Microsoft::VisualBasic::Conversion::Val(sender->ToString()); tem -= 1; this->Text1[tem]->Focus(); //this->Text1[0]->Focus(); } } else { comp = true; } e->KeyChar = (int)KeyAscii; if (KeyAscii == 0) { e->Handled::set(true); } }