I'm creating a registration C++ form and everything is working except one thing (at this point anyways).
private: System::Void Register_Click(System::Object * sender, System::EventArgs * e)
{
Username = UsertxtBox->Text;
Password = PasstxtBox->Text;
if ( Username == "" || Password == "" ) {
ErrorTxtBox->Text = "Error in Registration.";
}
else { RegCompleteBox->Text = "Registration Complete!"; }
}
I'm trying to make so you have to type a character in for username and password. If this is the case it goes the the error txt box and says so. However, it always returns false and returns the else statement true.
Any advice what I'm doing wrong?