Hi again, I've run into a problem with an if statement in my code.
Here is the code:
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{
if ((textBox1->Text == ("")) && (radioButton1->Checked == false) && (radioButton2->Checked == false) && (radioButton3->Checked = false))
{
Form3 ^form3 = gcnew Form3();
form3->Show();
}
else
{
Form2 ^form2 = gcnew Form2();
form2->Show();
this->Hide();
}
}
The errors: (All errors apply for line 3)
error C2180: controlling expression has type 'void'
error C2297: '&&' : illegal, right operand has type 'void'
This is coming from a first time startup screen form. I want all the blanks to be filled out, if they arn't, then I want an error message to display.
If this matters at all, I am using Visual C++ in Visual Studio 2010.
On a side note, does anyone know a better way than
This->Hide(0;
for closing a form window when opening another?
Thanks for any help I get,
TSims11