Hi Everyone.
I have been Looking around for a Tutorial on Forms in Visual C++ I found a nice graphical calculator walkthrough for C# but the code for C# and C++ is a little diffrent and I cant get it working in C++.
I am trying to make a Form that takes infermation from a ComboBox(Drop Down). to Calculate somthing later on.
my issue is I am finding it hard to figure out how to get the infermation from the ComboBox hehe.
in C# if i have a comboBox called grav I can just get the infermation I want out of it by using
Grav.Text == 'sting'
I am wanting to do somthing like that in C++
here is what I have coded so far.
private: System::Void Temp_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void Atmos_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void Gravity_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void CAinput_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void CAtext_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox1_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void Calc_Click(System::Object^ sender, System::EventArgs^ e) {
if (Gavity.Text == 'Heavy' || 'Normal' || 'Low'){
if (Atmos.Text == 'Gaseous' || 'Noxious' || 'Terran'){
if (Temp.Text == 'Blistering' || 'Frozer' || 'Temperate'){
if (Gravity.Text == 'Heavy'){
gravholder = 0.5;
}
if (Gravity.Text == 'Normal'){
gravholder = 1;
}
if (Gravity.Text == 'Low'){
gravholder = 0.75;
}
if (Atmos.Text == 'Gaseous'){
atmosholder = 0.5;
}
if (Atmos.Text == 'Noxious'){
atmosholder = 0.75;
}
if (Atmos.Text == 'Terran'){
atmosholder = 1;
}
if (Temp.Text == 'Blistering'){
tempholder = 0.5;
}
if (Temp.Text == 'Frozen'){
tempholder = 0.75;
}
if (Temp.Text == 'Temperate'){
tempholder = 1;
}
}
}
}
}
as you can see what im am trying to do is take out the string the user selects and attach a multyplier to it. Then after that i am going to run it through some calculations to get me an awnser.
If some one could help me i would be very greatful.
Thanks,
Jordan