Image

Imagejavamdk wrote in Imagecpp

Confused Windows Form

I'm creating just a simple windows form that has two text boxes (lets say, txtBox1 and txtBox2) and has a button which will calculate.

I have where if txtBox1 is inputed it will go through a series of calculations.

If txtBox2 is inputed, it will do reverse calculations.

Here's what my click event for Calculate would be:

private: System::Void button1_Click(System::Object *  sender, System::EventArgs *  e)
{   if (sum > 200)
    { . . . for txtBox1
    }
    else if (sum < 0)
    { . . . for txtBox1
    }
}


but when I add another else if that will check to see if input was entered for txtBox2, it won't do anything.


Any help?