Okay, so almost the exact same code works in one of my c++/cli projects, but not the other. Both have the variables set as public, so they should be free to change. But only the first one does, and the second one does nothing.
Here's the button click code for the first.
1:
private: System::Void helium_Click(System::Object^ sender, System::EventArgs^ e) {
Form2^ form = gcnew Form2();
form->Show();
form->atomname->Text = "Helium";
form->comionic->Text = "N/A";
form->molmass->Text = "4.00 G/Mol";
form->atomicnumber->Text = "2";
form->color->Text = "Colorless";
form->diatomic->Text = "Yes";
form->pronounce->Text = "HEE-lee-am";
form->mpoint->Text = "-272.20 °C";
form->bpoint->Text = "-268.93 °C";
form->tpoint->Text = "No Triple Point";
form->state->Text = "Gas";
form->adinfo->Text = "Helium naturally occurs as He2. It is a colorless, odorless gas. Helium has no"
" common compounds, as any compounds made with Helium are extremely unstable at room temperature."
" Uses include coolant in superconducting magnets, and since it is lighter than air, it is used"
" to lift airships and balloons, it is also a vital component in rocket fuel.";
}
And the one that doesn't work.
2:
Info^ form = gcnew Info();
form->ShowDialog();
form->name->Text = "Calculator";
form->infobox->Text = "Test";
It just doesn't change the text at all. Any help? I can't see what I did wrong.