Hi, it's me again with another question. Here is the thing. I have a small game - a picture is shown and you should type the name of the person that's on the picture. Then you have a "check" button which when clicked checks if the answer is correct or incorrect.But i got a problem, it always checks for the latest command given by me, for example - if...==Jimi-correct, and i want to get it changing, like checking for each picture's name. My first picture is Philip, and it expects me to write Jimi, to answer "Correct", which is my second picture's name. Here is the code. Thank you.
#pragma endregion
private: System::Void label1_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox1_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
textBox1->Clear();
label1->Visible=false;
label3->Visible=true;
label2->Text="";
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
if (textBox1->Text=="Filip")
{
label2->Text="Correct";
}
else
{
label2->Text="Incorrect";
}
if (textBox1->Text=="Jimi")
{
label2->Text="Correct";
}
else
{
label2->Text="Incorrect";
}
}
};
}