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

>>if (Gavity.Text == 'Heavy' || 'Normal' || 'Low'){
That isn't a c++ legal statement, manage or unmanaged. if( Gavity.Text == "Heavy" || Gavity.Text == "Normal" || Gavity.Text == "Low"){ I created a simple Forms application with a combo box and a text box, then copied the selected item in the combo box into the tex box. Works perfectly, so you should be able to adapt it to your problem. The last few lines of the code below is only what you will probably need. I just posted the whole file just in case you need it.

#pragma once

namespace FormsText {

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;

	/// <summary>
	/// Summary for Form1
	/// </summary>
	public ref class Form1 : public System::Windows::Forms::Form
	{
	public:
		Form1(void)
		{
			InitializeComponent();
			//
			//TODO: Add the constructor code here
			//
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~Form1()
		{
			if (components)
			{
				delete components;
			}
		}
    private: System::Windows::Forms::ComboBox^  comboBox1;
    private: System::Windows::Forms::TextBox^  textBox1;
    private: System::Windows::Forms::TextBox^  textBox2;
    protected: 

	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
            this->comboBox1 = (gcnew System::Windows::Forms::ComboBox());
            this->textBox1 = (gcnew System::Windows::Forms::TextBox());
            this->textBox2 = (gcnew System::Windows::Forms::TextBox());
            this->SuspendLayout();
            // 
            // comboBox1
            // 
            this->comboBox1->FormattingEnabled = true;
            this->comboBox1->Items->AddRange(gcnew cli::array< System::Object^  >(10) {L"One", L"Two", L"Three", L"Four", L"Five", L"Six", 
                L"Seven", L"Eight", L"Nine", L"Ten"});
            this->comboBox1->Location = System::Drawing::Point(27, 45);
            this->comboBox1->Name = L"comboBox1";
            this->comboBox1->Size = System::Drawing::Size(213, 24);
            this->comboBox1->TabIndex = 0;
            this->comboBox1->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::comboBox1_SelectedIndexChanged);
            // 
            // textBox1
            // 
            this->textBox1->Location = System::Drawing::Point(35, 53);
            this->textBox1->Name = L"textBox1";
            this->textBox1->Size = System::Drawing::Size(100, 22);
            this->textBox1->TabIndex = 1;
            // 
            // textBox2
            // 
            this->textBox2->Location = System::Drawing::Point(27, 114);
            this->textBox2->Name = L"textBox2";
            this->textBox2->Size = System::Drawing::Size(183, 22);
            this->textBox2->TabIndex = 2;
            // 
            // Form1
            // 
            this->AutoScaleDimensions = System::Drawing::SizeF(8, 16);
            this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
            this->ClientSize = System::Drawing::Size(282, 255);
            this->Controls->Add(this->textBox2);
            this->Controls->Add(this->textBox1);
            this->Controls->Add(this->comboBox1);
            this->Name = L"Form1";
            this->Text = L"Form1";
            this->ResumeLayout(false);
            this->PerformLayout();

        }
#pragma endregion
    private: System::Void comboBox1_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) {
                 String^ select = this->comboBox1->Text;
                 this->textBox2->Text = select;
             }
    };
}

Thanks for the Help. And the correction on the line of code i messed up on :).

I am going to try what you have done and see if i can link it with it all. I have never created a windows form aplication in C++ before so this is a little new to me.

anyway im am very greatful.

kind regards,
Jordan

ok i suck :P. i just dont know how to use it in C++. i have tried loads of ways now. I'm just not sure how to get it working I keep getting this error message:

1>c:\users\jordan\documents\visual studio 2010\projects\ss calculator\ss calculator\Form1.h(323): error C2446: '==' : no conversion from 'int' to 'System:: String ^'
1> No user-defined-conversion operator available, or
1> No standard conversion exists from the boxed form of the arithmetic type to the target type

thats when I tried to use strcmp which didnt work eighter. sorry if my code looks like a mess its a bit jumpy lol. what im wanting to do is take the info from the comboBox and place a veribable with it. so when the user finishes selecting the 3 drop downs. it will take the string inputs. Then take what ever multiplier that was put with the string(i have tried to do this with if statments). then after that it will times the multiplyer's togeather then times that by 100 (havent codded that in yet becuase there not point till i can get the infermation).

im really tempted to just make it in C# but I want to have a better understanding in C++ becuase I am more likly to be working in that field in the future.

here is the code so far (and yes its bad i know :P)

#pragma once
#include <cstring>

namespace SSCalculator {

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;

	/// <summary>
	/// Summary for Form1
	/// </summary>
	public ref class Form1 : public System::Windows::Forms::Form
	{
	public:
		Form1(void)
		{
			InitializeComponent();
			//
			//TODO: Add the constructor code here
			//
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~Form1()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::ComboBox^  Gravity;
	private: System::Windows::Forms::ComboBox^  Atmos;
	protected: 






	private: System::Windows::Forms::TextBox^  CAinput;

	private: System::Windows::Forms::Button^  Calc;


	private: System::Windows::Forms::MenuStrip^  menuStrip1;
	private: System::Windows::Forms::ToolStripMenuItem^  viewToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  cACalculatorToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  shipFittingToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  baseCalculatorToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  helpToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  howToUseToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  aboutToolStripMenuItem;
	private: System::Windows::Forms::ComboBox^  Temp;
	private: System::Windows::Forms::Label^  gravtext;
	private: System::Windows::Forms::Label^  atmostext;
	private: System::Windows::Forms::Label^  temptext;
	private: System::Windows::Forms::Label^  catext;
	private: System::Windows::Forms::TextBox^  inputText;



	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
			this->Gravity = (gcnew System::Windows::Forms::ComboBox());
			this->Atmos = (gcnew System::Windows::Forms::ComboBox());
			this->CAinput = (gcnew System::Windows::Forms::TextBox());
			this->Calc = (gcnew System::Windows::Forms::Button());
			this->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip());
			this->viewToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->cACalculatorToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->shipFittingToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->baseCalculatorToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->helpToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->howToUseToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->aboutToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->Temp = (gcnew System::Windows::Forms::ComboBox());
			this->gravtext = (gcnew System::Windows::Forms::Label());
			this->atmostext = (gcnew System::Windows::Forms::Label());
			this->temptext = (gcnew System::Windows::Forms::Label());
			this->catext = (gcnew System::Windows::Forms::Label());
			this->inputText = (gcnew System::Windows::Forms::TextBox());
			this->menuStrip1->SuspendLayout();
			this->SuspendLayout();
			// 
			// Gravity
			// 
			this->Gravity->AllowDrop = true;
			this->Gravity->FormattingEnabled = true;
			this->Gravity->Items->AddRange(gcnew cli::array< System::Object^  >(3) {L"Heavy", L"Normal", L"Light"});
			this->Gravity->Location = System::Drawing::Point(12, 82);
			this->Gravity->Name = L"Gravity";
			this->Gravity->Size = System::Drawing::Size(121, 21);
			this->Gravity->TabIndex = 0;
			this->Gravity->Text = L"Selection";
			this->Gravity->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::Gravity_SelectedIndexChanged);
			// 
			// Atmos
			// 
			this->Atmos->FormattingEnabled = true;
			this->Atmos->Items->AddRange(gcnew cli::array< System::Object^  >(3) {L"Gaseous", L"Noxious", L"Terran"});
			this->Atmos->Location = System::Drawing::Point(12, 132);
			this->Atmos->Name = L"Atmos";
			this->Atmos->Size = System::Drawing::Size(121, 21);
			this->Atmos->TabIndex = 1;
			this->Atmos->Text = L"Selection";
			this->Atmos->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::Atmos_SelectedIndexChanged);
			// 
			// CAinput
			// 
			this->CAinput->Location = System::Drawing::Point(163, 82);
			this->CAinput->Name = L"CAinput";
			this->CAinput->Size = System::Drawing::Size(121, 20);
			this->CAinput->TabIndex = 6;
			this->CAinput->Text = L"Enter your CA Level";
			this->CAinput->TextChanged += gcnew System::EventHandler(this, &Form1::CAinput_TextChanged);
			// 
			// Calc
			// 
			this->Calc->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->Calc->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"Calc.Image")));
			this->Calc->Location = System::Drawing::Point(12, 209);
			this->Calc->Name = L"Calc";
			this->Calc->Size = System::Drawing::Size(79, 21);
			this->Calc->TabIndex = 8;
			this->Calc->Text = L"Calculate";
			this->Calc->UseVisualStyleBackColor = true;
			this->Calc->Click += gcnew System::EventHandler(this, &Form1::Calc_Click);
			// 
			// menuStrip1
			// 
			this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(2) {this->viewToolStripMenuItem, 
				this->helpToolStripMenuItem});
			this->menuStrip1->Location = System::Drawing::Point(0, 0);
			this->menuStrip1->Name = L"menuStrip1";
			this->menuStrip1->Size = System::Drawing::Size(301, 24);
			this->menuStrip1->TabIndex = 10;
			this->menuStrip1->Text = L"menuStrip1";
			// 
			// viewToolStripMenuItem
			// 
			this->viewToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(3) {this->cACalculatorToolStripMenuItem, 
				this->shipFittingToolStripMenuItem, this->baseCalculatorToolStripMenuItem});
			this->viewToolStripMenuItem->Name = L"viewToolStripMenuItem";
			this->viewToolStripMenuItem->Size = System::Drawing::Size(44, 20);
			this->viewToolStripMenuItem->Text = L"View";
			// 
			// cACalculatorToolStripMenuItem
			// 
			this->cACalculatorToolStripMenuItem->Name = L"cACalculatorToolStripMenuItem";
			this->cACalculatorToolStripMenuItem->Size = System::Drawing::Size(155, 22);
			this->cACalculatorToolStripMenuItem->Text = L"CA Calculator";
			// 
			// shipFittingToolStripMenuItem
			// 
			this->shipFittingToolStripMenuItem->Name = L"shipFittingToolStripMenuItem";
			this->shipFittingToolStripMenuItem->Size = System::Drawing::Size(155, 22);
			this->shipFittingToolStripMenuItem->Text = L"Ship Fitting";
			// 
			// baseCalculatorToolStripMenuItem
			// 
			this->baseCalculatorToolStripMenuItem->Name = L"baseCalculatorToolStripMenuItem";
			this->baseCalculatorToolStripMenuItem->Size = System::Drawing::Size(155, 22);
			this->baseCalculatorToolStripMenuItem->Text = L"Base Calculator";
			// 
			// helpToolStripMenuItem
			// 
			this->helpToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(2) {this->howToUseToolStripMenuItem, 
				this->aboutToolStripMenuItem});
			this->helpToolStripMenuItem->Name = L"helpToolStripMenuItem";
			this->helpToolStripMenuItem->Size = System::Drawing::Size(44, 20);
			this->helpToolStripMenuItem->Text = L"Help";
			// 
			// howToUseToolStripMenuItem
			// 
			this->howToUseToolStripMenuItem->Name = L"howToUseToolStripMenuItem";
			this->howToUseToolStripMenuItem->Size = System::Drawing::Size(135, 22);
			this->howToUseToolStripMenuItem->Text = L"How to Use";
			// 
			// aboutToolStripMenuItem
			// 
			this->aboutToolStripMenuItem->Name = L"aboutToolStripMenuItem";
			this->aboutToolStripMenuItem->Size = System::Drawing::Size(135, 22);
			this->aboutToolStripMenuItem->Text = L"About";
			// 
			// Temp
			// 
			this->Temp->AccessibleRole = System::Windows::Forms::AccessibleRole::ComboBox;
			this->Temp->BackColor = System::Drawing::SystemColors::Window;
			this->Temp->FormattingEnabled = true;
			this->Temp->Items->AddRange(gcnew cli::array< System::Object^  >(3) {L"Blistering", L"Frozen", L"Temperate"});
			this->Temp->Location = System::Drawing::Point(12, 182);
			this->Temp->Name = L"Temp";
			this->Temp->Size = System::Drawing::Size(121, 21);
			this->Temp->TabIndex = 11;
			this->Temp->Text = L"Selection";
			this->Temp->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::Temp_SelectedIndexChanged);
			// 
			// gravtext
			// 
			this->gravtext->AutoSize = true;
			this->gravtext->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 11, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->gravtext->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->gravtext->Location = System::Drawing::Point(13, 61);
			this->gravtext->Name = L"gravtext";
			this->gravtext->Size = System::Drawing::Size(54, 18);
			this->gravtext->TabIndex = 12;
			this->gravtext->Text = L"Gravity";
			this->gravtext->Click += gcnew System::EventHandler(this, &Form1::gravtext_Click);
			// 
			// atmostext
			// 
			this->atmostext->AutoSize = true;
			this->atmostext->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 11, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->atmostext->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->atmostext->Location = System::Drawing::Point(12, 111);
			this->atmostext->Name = L"atmostext";
			this->atmostext->Size = System::Drawing::Size(58, 18);
			this->atmostext->TabIndex = 13;
			this->atmostext->Text = L"Climate";
			this->atmostext->Click += gcnew System::EventHandler(this, &Form1::atmostext_Click);
			// 
			// temptext
			// 
			this->temptext->AutoSize = true;
			this->temptext->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 11, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->temptext->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->temptext->Location = System::Drawing::Point(13, 161);
			this->temptext->Name = L"temptext";
			this->temptext->Size = System::Drawing::Size(92, 18);
			this->temptext->TabIndex = 14;
			this->temptext->Text = L"Temperature";
			this->temptext->Click += gcnew System::EventHandler(this, &Form1::temptext_Click_1);
			// 
			// catext
			// 
			this->catext->AutoSize = true;
			this->catext->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 11, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->catext->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->catext->Location = System::Drawing::Point(169, 61);
			this->catext->Name = L"catext";
			this->catext->Size = System::Drawing::Size(70, 18);
			this->catext->TabIndex = 15;
			this->catext->Text = L"CA Level:";
			this->catext->Click += gcnew System::EventHandler(this, &Form1::catext_Click_1);
			// 
			// inputText
			// 
			this->inputText->Location = System::Drawing::Point(12, 38);
			this->inputText->Name = L"inputText";
			this->inputText->ReadOnly = true;
			this->inputText->Size = System::Drawing::Size(272, 20);
			this->inputText->TabIndex = 16;
			this->inputText->TabStop = false;
			this->inputText->TextChanged += gcnew System::EventHandler(this, &Form1::inputText_TextChanged);
			// 
			// Form1
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->BackColor = System::Drawing::SystemColors::ActiveCaptionText;
			this->BackgroundImage = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"$this.BackgroundImage")));
			this->ClientSize = System::Drawing::Size(301, 244);
			this->Controls->Add(this->inputText);
			this->Controls->Add(this->catext);
			this->Controls->Add(this->temptext);
			this->Controls->Add(this->atmostext);
			this->Controls->Add(this->gravtext);
			this->Controls->Add(this->Temp);
			this->Controls->Add(this->Calc);
			this->Controls->Add(this->CAinput);
			this->Controls->Add(this->Atmos);
			this->Controls->Add(this->Gravity);
			this->Controls->Add(this->menuStrip1);
			this->MainMenuStrip = this->menuStrip1;
			this->Name = L"Form1";
			this->Text = L"Star Sonata Calculator";
			this->menuStrip1->ResumeLayout(false);
			this->menuStrip1->PerformLayout();
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion
		float gravholder;
		float atmosholder;
		float tempholder;
		

private: System::Void Temp_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) {
			 String^ Temptextholder = this->Temp->Text;
			 if (strcmp (Temptextholder, 'Blistering') == 0){
				 if (strcmp (Temptextholder, 'Frozer') == 0){
					 if (strcmp (Temptextholder, 'Temperate') == 0 ){
						if (Temptextholder == 'Blistering'){
							tempholder = 0.5;
						}
						if (Temptextholder == 'Frozen'){
							tempholder = 0.75;
						}
						if (Temptextholder == 'Temperate'){
						    tempholder = 1;
						}
					}
				 }
			 }
		 }
private: System::Void Atmos_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) {
			 String^ Atmostext = this->Atmos->Text;
			 if (strcmp (Atmostext, "Gaseous") == 0){
				 if (strcmp (Atmostext, "Noxious") == 0){
					 if (strcmp (Atmostext, "Terran") == 0){
						 if (Atmostext == 'Gaseous'){
							 atmosholder = 0.5;
						 }
						 if (Atmostext == 'Noxious'){
							 atmosholder = 0.75;
						 }
						 if (Atmostext == 'Terran'){
							 atmosholder = 1;
						 }
					 }
				 }
			 }

		 }
private: System::Void Gravity_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) {
			 String^ select = this->Gravity->Text;
			 if (select == 'Heavy'){
				 if (select ==  'Normal'){
					 if (select == 'Low'){
						 if (select == 'Heavy'){
							 gravholder = 0.5;
						 }
						 if (select == 'Normal'){
							 gravholder = 1;
						 }
						 if (select == 'Low'){
							 gravholder = 0.75;
						 }
					 }
				 }
			 }
		 }
private: System::Void CAinput_TextChanged(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void Calc_Click(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void temptext_Click_1(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void atmostext_Click(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void catext_Click_1(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void gravtext_Click(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void inputText_TextChanged(System::Object^  sender, System::EventArgs^  e) {
		 }
};
}

thanks,
Jordan

Parts of this code will never execute. In fact, only the first if statement could ever be accepted.

if (select == 'Heavy'){
   if (select ==  'Normal'){
      if (select == 'Low'){	
         if (select == 'Heavy'){	
            gravholder = 0.5;	
         }			
         if (select == 'Normal'){	
            gravholder = 1;		
	}		
	if (select == 'Low'){
	   gravholder = 0.75;	
	}			
      }				
   }			
}

try to use 'else if' statements along with just if. For example:

if(select == 'Heavy')
   gravHolder = 0.5;
else if(select == 'Normal')
   gravHolder = 1;
else if(select == 'Low')
   gravHolder = 0.75;

I note you've done similar things throughout seperate blocks of code. Basically, if the first if statement of a block isn't satisfied, the compiler wont look any deeper into the code at all, it'll simply skip to the close parenthesis }...

The strings Heavy Normal and Low have to be in doubl quotes, not single quotes.

lol i cant bealive i was dumb enough to make that mistack. it was becuase before i had it all on one line so it would of worked. i wasnt thinking when i split it hehe. but it still having problems with it. its saying line consists of to many characters. and i got know clue why

As Ancient Dragon says, use double quotes instead of single...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.