How do I open a Form using a Combobox In C++?
How do I open a Form using a combobox? If I have 3 Values such as apples, oranges and I want to open a form if the user choses apples and another form if the user choses oranges.
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
FrenchFries ^ newfrm = gcnew FrenchFries();
if (comboBox1::Text = "French Fries")
newfrm->Show();
else
Form::Close();
This is the error that I get.
error C2451: conditional expression of type 'void' is illegal
error C2653: 'comboBox1' : is not a class or namespace name
8 hours ago
- 4 days left to answer.