Using Windows Form Application from Visual Studio 2010.

KK The big problem... When I compile it and run the program, Enter a value into the textbox, it automatically changes to a value the program has defaulted.

I'll attach the Program/Project Folder incase anyone wants to compile/run it..

Example: Two textboxes.. Both Linked to eachother by code, If a value in one changes, the other automatically changes.. So when the User inputs a value into the first one, the second one automatically changes that value (in the first textbox) to a default one and Vice-Versa. That way I cannot get the user input calculated...

Is there a way to stop this!? or is it some loop that I cannot get out of?!

:( First Form Program and Already this much trouble :(
Been working on it all day + 2 hours last night.

#pragma once

namespace SlayerCalculator {

	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::Button^  button1;
	protected: 
	private: System::Windows::Forms::ComboBox^  comboBox1;
	private: System::Windows::Forms::Label^  TaskLabel;
	private: System::Windows::Forms::ComboBox^  comboBox2;
	private: System::Windows::Forms::Label^  MasterLabel;
	private: System::Windows::Forms::TextBox^  textBox1;
	private: System::Windows::Forms::Label^  label1;
	private: System::Windows::Forms::TextBox^  textBox2;
	private: System::Windows::Forms::Label^  label2;
	private: System::Windows::Forms::TextBox^  textBox3;
	private: System::Windows::Forms::Label^  label3;
	private: System::Windows::Forms::TextBox^  textBox4;
	private: System::Windows::Forms::Label^  label4;
	private: System::Windows::Forms::TextBox^  textBox5;
	private: System::Windows::Forms::Label^  label5;
	private: System::Windows::Forms::Label^  label6;
	private: System::Windows::Forms::TextBox^  textBox6;
	private: System::Windows::Forms::TextBox^  textBox7;
	private: System::Windows::Forms::Label^  label7;
	private: System::Windows::Forms::TextBox^  textBox8;
	private: System::Windows::Forms::Label^  label8;
	private: System::Windows::Forms::TextBox^  textBox9;
	private: System::Windows::Forms::Label^  label9;
	private: System::Windows::Forms::Button^  button2;
	private: System::Windows::Forms::Button^  button3;
	private: System::Windows::Forms::TextBox^  textBox10;



	private: System::ComponentModel::IContainer^  components;



	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>


#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->button1 = (gcnew System::Windows::Forms::Button());
			this->comboBox1 = (gcnew System::Windows::Forms::ComboBox());
			this->TaskLabel = (gcnew System::Windows::Forms::Label());
			this->comboBox2 = (gcnew System::Windows::Forms::ComboBox());
			this->MasterLabel = (gcnew System::Windows::Forms::Label());
			this->textBox1 = (gcnew System::Windows::Forms::TextBox());
			this->label1 = (gcnew System::Windows::Forms::Label());
			this->textBox2 = (gcnew System::Windows::Forms::TextBox());
			this->label2 = (gcnew System::Windows::Forms::Label());
			this->textBox3 = (gcnew System::Windows::Forms::TextBox());
			this->label3 = (gcnew System::Windows::Forms::Label());
			this->textBox4 = (gcnew System::Windows::Forms::TextBox());
			this->label4 = (gcnew System::Windows::Forms::Label());
			this->textBox5 = (gcnew System::Windows::Forms::TextBox());
			this->label5 = (gcnew System::Windows::Forms::Label());
			this->label6 = (gcnew System::Windows::Forms::Label());
			this->textBox6 = (gcnew System::Windows::Forms::TextBox());
			this->textBox7 = (gcnew System::Windows::Forms::TextBox());
			this->label7 = (gcnew System::Windows::Forms::Label());
			this->textBox8 = (gcnew System::Windows::Forms::TextBox());
			this->label8 = (gcnew System::Windows::Forms::Label());
			this->textBox9 = (gcnew System::Windows::Forms::TextBox());
			this->label9 = (gcnew System::Windows::Forms::Label());
			this->button2 = (gcnew System::Windows::Forms::Button());
			this->button3 = (gcnew System::Windows::Forms::Button());
			this->textBox10 = (gcnew System::Windows::Forms::TextBox());
			this->SuspendLayout();
			// 
			// button1
			// 
			this->button1->Location = System::Drawing::Point(584, 89);
			this->button1->Name = L"button1";
			this->button1->Size = System::Drawing::Size(75, 23);
			this->button1->TabIndex = 0;
			this->button1->Text = L"Calculate";
			this->button1->UseVisualStyleBackColor = true;
			this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
			// 
			// comboBox1
			// 
			this->comboBox1->AutoCompleteMode = System::Windows::Forms::AutoCompleteMode::Suggest;
			this->comboBox1->AutoCompleteSource = System::Windows::Forms::AutoCompleteSource::ListItems;
			this->comboBox1->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;
			this->comboBox1->FormattingEnabled = true;
			this->comboBox1->Items->AddRange(gcnew cli::array< System::Object^  >(94) {L"Abberant Spectres", L"Abyssal Demons", L"Ankou", 
				L"Aquanites", L"Banshees", L"Basilisks", L"Bats", L"Bears", L"Birds", L"Black Demons", L"Bloodvelds", L"Blue Dragons", L"Brine Rats", 
				L"Bronze Dragons", L"Catablepons", L"Cave Bugs", L"Cave Crawlers", L"Cave Horrors", L"Cave Slimes", L"Cockatrices", L"Cows", 
				L"Crawling Hands", L"Crocodiles", L"Dagannoths", L"Dark Beasts", L"Desert Lizards", L"Dogs", L"Dust Devils", L"Dwarves", L"Earth Warriors", 
				L"Elves", L"Fever Spiders", L"Fire Giants", L"Flesh Crawlers", L"Gargoyles", L"Ghosts", L"Ghouls", L"Goblins", L"Greater Demons", 
				L"Green Dragons", L"Harpie Bug Swarms", L"Hellhounds", L"Hill Giants", L"Hobgoblins", L"Ice Giants", L"Ice Strykewyrms", L"Ice Warriors", 
				L"Icefiends", L"Infernal Mages", L"Iron Dragons", L"Jellies", L"Jungle Horrors", L"Jungle Strykewyrms", L"Kalphites", L"Killerwatts", 
				L"Kurasks", L"Lesser Demon", L"Living Rock Creatures", L"Minotaurs", L"Mithril Dragons", L"Mogres", L"Molanisks", L"Monkeys", 
				L"Moss Giants", L"Mutated Zygomites", L"Nechryaels", L"Orgres", L"Other Worldly Beings", L"Pyrefiends", L"Red Dragons", L"Rockslugs", 
				L"Scarabite Minions", L"Scorpions", L"Sea Snakes", L"Shaddow Warriors", L"Shades", L"Skeletal Wyverns", L"Skeletons", L"Spiders", 
				L"Spiritual Mages", L"Spiritual Warriors", L"Steel Dragons", L"Suqahs", L"Terror Dogs", L"Trolls", L"Turoths", L"TzHaar", L"Vampires", 
				L"Wall Beasts", L"Warped Tortoises", L"Waterfiends", L"Werewolves", L"Wolves", L"Zombies"});
			this->comboBox1->Location = System::Drawing::Point(39, 171);
			this->comboBox1->Name = L"comboBox1";
			this->comboBox1->Size = System::Drawing::Size(162, 21);
			this->comboBox1->Sorted = true;
			this->comboBox1->TabIndex = 1;
			this->comboBox1->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::comboBox1_SelectedIndexChanged);
			// 
			// TaskLabel
			// 
			this->TaskLabel->AutoSize = true;
			this->TaskLabel->Location = System::Drawing::Point(36, 155);
			this->TaskLabel->Name = L"TaskLabel";
			this->TaskLabel->Size = System::Drawing::Size(82, 13);
			this->TaskLabel->TabIndex = 2;
			this->TaskLabel->Text = L"Task/Monsters:";
			// 
			// comboBox2
			// 
			this->comboBox2->AutoCompleteMode = System::Windows::Forms::AutoCompleteMode::Suggest;
			this->comboBox2->AutoCompleteSource = System::Windows::Forms::AutoCompleteSource::ListItems;
			this->comboBox2->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;
			this->comboBox2->FormattingEnabled = true;
			this->comboBox2->Items->AddRange(gcnew cli::array< System::Object^  >(7) {L"Chaeldar (Lost City)", L"Duradel/Lapalok (Shilo Village)", 
				L"Kuradal (Ancient Cavern)", L"Mazchna (Canifis)", L"Sumona (Pollnivneach)", L"Turael/Spria (Burthorpe)", L"Vannaka (Edgeville Dungeon)"});
			this->comboBox2->Location = System::Drawing::Point(39, 92);
			this->comboBox2->Name = L"comboBox2";
			this->comboBox2->Size = System::Drawing::Size(162, 21);
			this->comboBox2->Sorted = true;
			this->comboBox2->TabIndex = 3;
			this->comboBox2->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::comboBox2_SelectedIndexChanged);
			// 
			// MasterLabel
			// 
			this->MasterLabel->AutoSize = true;
			this->MasterLabel->Location = System::Drawing::Point(36, 76);
			this->MasterLabel->Name = L"MasterLabel";
			this->MasterLabel->Size = System::Drawing::Size(74, 13);
			this->MasterLabel->TabIndex = 4;
			this->MasterLabel->Text = L"Slayer Master:";
			this->MasterLabel->Click += gcnew System::EventHandler(this, &Form1::label1_Click);
			// 
			// textBox1
			// 
			this->textBox1->Location = System::Drawing::Point(272, 92);
			this->textBox1->Name = L"textBox1";
			this->textBox1->Size = System::Drawing::Size(33, 20);
			this->textBox1->TabIndex = 5;
			this->textBox1->TextChanged += gcnew System::EventHandler(this, &Form1::textBox1_TextChanged);
			this->textBox1->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::textBox1_KeyPress);
			// 
			// label1
			// 
			this->label1->AutoSize = true;
			this->label1->Location = System::Drawing::Point(241, 76);
			this->label1->Name = L"label1";
			this->label1->Size = System::Drawing::Size(108, 13);
			this->label1->TabIndex = 6;
			this->label1->Text = L"Current Slayer Points:";
			// 
			// textBox2
			// 
			this->textBox2->Location = System::Drawing::Point(424, 92);
			this->textBox2->Name = L"textBox2";
			this->textBox2->ReadOnly = true;
			this->textBox2->Size = System::Drawing::Size(61, 20);
			this->textBox2->TabIndex = 7;
			this->textBox2->TextChanged += gcnew System::EventHandler(this, &Form1::textBox2_TextChanged);
			this->textBox2->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::textBox2_KeyPress);
			// 
			// label2
			// 
			this->label2->AutoSize = true;
			this->label2->Location = System::Drawing::Point(382, 76);
			this->label2->Name = L"label2";
			this->label2->Size = System::Drawing::Size(138, 13);
			this->label2->TabIndex = 8;
			this->label2->Text = L"Total Points On Completion:";
			// 
			// textBox3
			// 
			this->textBox3->Location = System::Drawing::Point(403, 167);
			this->textBox3->Name = L"textBox3";
			this->textBox3->Size = System::Drawing::Size(100, 20);
			this->textBox3->TabIndex = 9;
			this->textBox3->TextChanged += gcnew System::EventHandler(this, &Form1::textBox3_TextChanged);
			this->textBox3->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::textBox3_KeyPress);
			// 
			// label3
			// 
			this->label3->AutoSize = true;
			this->label3->Location = System::Drawing::Point(421, 151);
			this->label3->Name = L"label3";
			this->label3->Size = System::Drawing::Size(61, 13);
			this->label3->TabIndex = 10;
			this->label3->Text = L"Current XP:";
			// 
			// textBox4
			// 
			this->textBox4->Location = System::Drawing::Point(272, 167);
			this->textBox4->Name = L"textBox4";
			this->textBox4->Size = System::Drawing::Size(33, 20);
			this->textBox4->TabIndex = 11;
			this->textBox4->TextChanged += gcnew System::EventHandler(this, &Form1::textBox4_TextChanged);
			this->textBox4->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::textBox4_KeyPress);
			// 
			// label4
			// 
			this->label4->AutoSize = true;
			this->label4->Location = System::Drawing::Point(254, 151);
			this->label4->Name = L"label4";
			this->label4->Size = System::Drawing::Size(70, 13);
			this->label4->TabIndex = 12;
			this->label4->Text = L"Current Level";
			// 
			// textBox5
			// 
			this->textBox5->Location = System::Drawing::Point(403, 233);
			this->textBox5->Name = L"textBox5";
			this->textBox5->Size = System::Drawing::Size(100, 20);
			this->textBox5->TabIndex = 13;
			this->textBox5->TextChanged += gcnew System::EventHandler(this, &Form1::textBox5_TextChanged);
			this->textBox5->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::textBox5_KeyPress);
			// 
			// label5
			// 
			this->label5->AutoSize = true;
			this->label5->Location = System::Drawing::Point(432, 217);
			this->label5->Name = L"label5";
			this->label5->Size = System::Drawing::Size(58, 13);
			this->label5->TabIndex = 14;
			this->label5->Text = L"Target XP:";
			// 
			// label6
			// 
			this->label6->AutoSize = true;
			this->label6->Location = System::Drawing::Point(254, 217);
			this->label6->Name = L"label6";
			this->label6->Size = System::Drawing::Size(70, 13);
			this->label6->TabIndex = 15;
			this->label6->Text = L"Target Level:";
			// 
			// textBox6
			// 
			this->textBox6->Location = System::Drawing::Point(272, 232);
			this->textBox6->Name = L"textBox6";
			this->textBox6->Size = System::Drawing::Size(33, 20);
			this->textBox6->TabIndex = 16;
			this->textBox6->TextChanged += gcnew System::EventHandler(this, &Form1::textBox6_TextChanged);
			this->textBox6->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::textBox6_KeyPress);
			// 
			// textBox7
			// 
			this->textBox7->Location = System::Drawing::Point(561, 232);
			this->textBox7->Name = L"textBox7";
			this->textBox7->ReadOnly = true;
			this->textBox7->Size = System::Drawing::Size(100, 20);
			this->textBox7->TabIndex = 17;
			this->textBox7->TextChanged += gcnew System::EventHandler(this, &Form1::textBox7_TextChanged);
			this->textBox7->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::textBox7_KeyPress);
			// 
			// label7
			// 
			this->label7->AutoSize = true;
			this->label7->Location = System::Drawing::Point(581, 216);
			this->label7->Name = L"label7";
			this->label7->Size = System::Drawing::Size(65, 13);
			this->label7->TabIndex = 18;
			this->label7->Text = L"XP Needed:";
			// 
			// textBox8
			// 
			this->textBox8->Location = System::Drawing::Point(561, 171);
			this->textBox8->Name = L"textBox8";
			this->textBox8->ReadOnly = true;
			this->textBox8->Size = System::Drawing::Size(100, 20);
			this->textBox8->TabIndex = 19;
			this->textBox8->TextChanged += gcnew System::EventHandler(this, &Form1::textBox8_TextChanged);
			this->textBox8->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::textBox8_KeyPress);
			// 
			// label8
			// 
			this->label8->AutoSize = true;
			this->label8->Location = System::Drawing::Point(561, 150);
			this->label8->Name = L"label8";
			this->label8->Size = System::Drawing::Size(114, 13);
			this->label8->TabIndex = 20;
			this->label8->Text = L"XP Gained From Task:";
			// 
			// textBox9
			// 
			this->textBox9->Location = System::Drawing::Point(45, 233);
			this->textBox9->Name = L"textBox9";
			this->textBox9->Size = System::Drawing::Size(120, 20);
			this->textBox9->TabIndex = 21;
			this->textBox9->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::textBox9_KeyPress);
			// 
			// label9
			// 
			this->label9->AutoSize = true;
			this->label9->Location = System::Drawing::Point(42, 217);
			this->label9->Name = L"label9";
			this->label9->Size = System::Drawing::Size(118, 13);
			this->label9->TabIndex = 22;
			this->label9->Text = L"# Of Monster Assigned:";
			// 
			// button2
			// 
			this->button2->Location = System::Drawing::Point(126, 12);
			this->button2->Name = L"button2";
			this->button2->Size = System::Drawing::Size(75, 23);
			this->button2->TabIndex = 23;
			this->button2->Text = L"Clear All";
			this->button2->UseVisualStyleBackColor = true;
			this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
			// 
			// button3
			// 
			this->button3->Location = System::Drawing::Point(445, 12);
			this->button3->Name = L"button3";
			this->button3->Size = System::Drawing::Size(75, 23);
			this->button3->TabIndex = 24;
			this->button3->Text = L"Save All";
			this->button3->UseVisualStyleBackColor = true;
			// 
			// textBox10
			// 
			this->textBox10->BackColor = System::Drawing::SystemColors::ControlLight;
			this->textBox10->Dock = System::Windows::Forms::DockStyle::Bottom;
			this->textBox10->Font = (gcnew System::Drawing::Font(L"Calibri", 9, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->textBox10->ForeColor = System::Drawing::Color::Red;
			this->textBox10->Location = System::Drawing::Point(0, 359);
			this->textBox10->Name = L"textBox10";
			this->textBox10->ReadOnly = true;
			this->textBox10->Size = System::Drawing::Size(716, 22);
			this->textBox10->TabIndex = 25;
			this->textBox10->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
			this->textBox10->TextChanged += gcnew System::EventHandler(this, &Form1::textBox10_TextChanged);
			// 
			// Form1
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->AutoSize = true;
			this->BackColor = System::Drawing::Color::Tan;
			this->ClientSize = System::Drawing::Size(716, 381);
			this->Controls->Add(this->textBox10);
			this->Controls->Add(this->button3);
			this->Controls->Add(this->button2);
			this->Controls->Add(this->label9);
			this->Controls->Add(this->textBox9);
			this->Controls->Add(this->label8);
			this->Controls->Add(this->textBox8);
			this->Controls->Add(this->label7);
			this->Controls->Add(this->textBox7);
			this->Controls->Add(this->textBox6);
			this->Controls->Add(this->label6);
			this->Controls->Add(this->label5);
			this->Controls->Add(this->textBox5);
			this->Controls->Add(this->label4);
			this->Controls->Add(this->textBox4);
			this->Controls->Add(this->label3);
			this->Controls->Add(this->textBox3);
			this->Controls->Add(this->label2);
			this->Controls->Add(this->textBox2);
			this->Controls->Add(this->label1);
			this->Controls->Add(this->textBox1);
			this->Controls->Add(this->MasterLabel);
			this->Controls->Add(this->comboBox2);
			this->Controls->Add(this->TaskLabel);
			this->Controls->Add(this->comboBox1);
			this->Controls->Add(this->button1);
			this->Name = L"Form1";
			this->Text = L"Slayer Calculator";
			this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion
	private: System::Void comboBox1_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) {
			 }
private: System::Void label1_Click(System::Object^  sender, System::EventArgs^  e) {
		 }

private: System::Void comboBox2_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) {
			 comboBox2->SelectedItem->ToString();

			 if(comboBox2->SelectedItem == "Chaeldar (Lost City)"){
				int tb1;
				Int32::TryParse(textBox1->Text,tb1); //enclose this in an if to make your own error handling
				int tb2 = tb1+comboBox2->SelectedIndex+10; 
				//it doesn't matter what's in the box, just use the offset
				textBox2->Text = tb2.ToString();
			 }
			 else if(comboBox2->SelectedItem == "Duradel/Lapalok (Shilo Village)"){
				 int tb3;
				 Int32::TryParse(textBox1->Text,tb3);
				 int tb4 = tb3+comboBox2->SelectedIndex+14;
				 textBox2->Text = tb4.ToString();
			 }
			 else if(comboBox2->SelectedItem == "Kuradal (Ancient Cavern)"){
				 int tb5;
				 Int32::TryParse(textBox1->Text,tb5);
				 int tb6 = tb5+comboBox2->SelectedIndex+16;
				 textBox2->Text = tb6.ToString();
			 }
			 else if(comboBox2->SelectedItem == "Mazchna (Canifis)"){
				 int tb7;
				 Int32::TryParse(textBox1->Text,tb7);
				 int tb8 = tb7+comboBox2->SelectedIndex-2;
				 textBox2->Text = tb8.ToString();
			 }
			 else if(comboBox2->SelectedItem == "Sumona (Pollnivneach)"){
				 int tb9;
				 Int32::TryParse(textBox1->Text,tb9);
				 int tb10 = tb9+comboBox2->SelectedIndex+8;
				 textBox2->Text = tb10.ToString();
			 }
			 else if(comboBox2->SelectedItem == "Turael/Spria (Burthorpe)"){
				 int tb11;
				 Int32::TryParse(textBox1->Text,tb11);
				 int tb12 = tb11+comboBox2->SelectedIndex-6;
				 textBox2->Text = tb12.ToString();
			 }
			 else if(comboBox2->SelectedItem == "Vannaka (Edgeville Dungeon)"){
				 int tb13;
				 Int32::TryParse(textBox1->Text,tb13);
				 int tb14 = tb13+comboBox2->SelectedIndex-2;
				 textBox2->Text = tb14.ToString();
			 }
}

private: System::Void textBox1_TextChanged(System::Object^  sender, System::EventArgs^  e) {
			 comboBox2->SelectedItem->ToString();

			 if(comboBox2->SelectedItem == "Chaeldar (Lost City)"){
				int tb1;
				Int32::TryParse(textBox1->Text,tb1); //enclose this in an if to make your own error handling
				int tb2 = tb1+comboBox2->SelectedIndex+10; 
				//it doesn't matter what's in the box, just use the offset
				textBox2->Text = tb2.ToString();
			 }
			 else if(comboBox2->SelectedItem == "Duradel/Lapalok (Shilo Village)"){
				 int tb3;
				 Int32::TryParse(textBox1->Text,tb3);
				 int tb4 = tb3+comboBox2->SelectedIndex+14;
				 textBox2->Text = tb4.ToString();
			 }
			 else if(comboBox2->SelectedItem == "Kuradal (Ancient Cavern)"){
				 int tb5;
				 Int32::TryParse(textBox1->Text,tb5);
				 int tb6 = tb5+comboBox2->SelectedIndex+16;
				 textBox2->Text = tb6.ToString();
			 }
			 else if(comboBox2->SelectedItem == "Mazchna (Canifis)"){
				 int tb7;
				 Int32::TryParse(textBox1->Text,tb7);
				 int tb8 = tb7+comboBox2->SelectedIndex-2;
				 textBox2->Text = tb8.ToString();
			 }
			 else if(comboBox2->SelectedItem == "Sumona (Pollnivneach)"){
				 int tb9;
				 Int32::TryParse(textBox1->Text,tb9);
				 int tb10 = tb9+comboBox2->SelectedIndex+8;
				 textBox2->Text = tb10.ToString();
			 }
			 else if(comboBox2->SelectedItem == "Turael/Spria (Burthorpe)"){
				 int tb11;
				 Int32::TryParse(textBox1->Text,tb11);
				 int tb12 = tb11+comboBox2->SelectedIndex-6;
				 textBox2->Text = tb12.ToString();
			 }
			 else if(comboBox2->SelectedItem == "Vannaka (Edgeville Dungeon)"){
				 int tb13;
				 Int32::TryParse(textBox1->Text,tb13);
				 int tb14 = tb13+comboBox2->SelectedIndex-2;
				 textBox2->Text = tb14.ToString();
			 }

		 }
private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {

			 int c3;
			 Int32::TryParse(textBox3->Text,c3);
			 int c5;
			 Int32::TryParse(textBox5->Text,c5);

			 int XPNeeded = ((c5)-(c3));
			 this->textBox7->Text = XPNeeded.ToString();



			 int crntlvl;
			 Int32::TryParse(textBox4->Text,crntlvl);
			 if (crntlvl > 99){
				 MessageBox::Show("Current Level cannot be Greater than 99!");
			 int crntlvl = (1);
			 textBox4->Text = crntlvl.ToString();
			 }
			 else if(crntlvl < 1){
				 MessageBox::Show("Current Level cannot be Less than 99!");
			 crntlvl = (1);
			 textBox4->Text = crntlvl.ToString();
			 }
		 }
private: System::Void textBox2_TextChanged(System::Object^  sender, System::EventArgs^  e) {			 
		 }
private: System::Void textBox3_TextChanged(System::Object^  sender, System::EventArgs^  e) {
			 int c3;
			 Int32::TryParse(textBox3->Text,c3);
			 int c4;
			 Int32::TryParse(textBox5->Text,c4);
		
			 if(c3>=0 && c3<83){
				 int c2 = (83);
			     textBox5->Text = c2.ToString();
				 int XPNeeded = ((83)-(c3));
				 this->textBox7->Text = XPNeeded.ToString();
			 }
			else if(c3>=83 && c3<174){
				int c2 = (174);
			     textBox5->Text = c2.ToString();
				 int XPNeeded = ((174)-(c3));
				 this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=174 && c3<276){
				int c2 = (276);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((276)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=276 && c3<388){
				int c2 = (388);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((388)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=388 && c3<512){
				int c2 = (512);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((512)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=512 && c3<650){
				int c2 = (650);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((650)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=650 && c3<801){
				int c2 = (801);
					 textBox5->Text = c2.ToString();
			            int XPNeeded = ((801)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=801 && c3<969){
				int c2 = (969);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((969)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=969 && c3<1154){
				int c2 = (1154);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((1154)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=1154 && c3<1358){
				int c2 = (1358);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((1358)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=1358 && c3<1584){
				int c2 = (1584);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((1584)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=1584 && c3<1833){
				int c2 = (1833);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((1833)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=1833 && c3<2107){
				int c2 = (2107);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((2107)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=2107 && c3<2411){
				int c2 = (2411);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((2411)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=2411 && c3<2746){
				int c2 = (2746);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((2746)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=2746 && c3<3115){
				int c2 = (3115);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((3115)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=3115 && c3<3523){
				int c2 = (3523);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((3523)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=3523 && c3<3973){
				int c2 = (3973);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((3973)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=3973 && c3<4470){
				int c2 = (4470);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((4470)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=4470 && c3<5018){
				int c2 = (5018);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((5018)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=5018 && c3<5624){
				int c2 = (5624);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((5624)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=5624 && c3<6291){
				int c2 = (6291);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((6291)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=6291 && c3<7028){
				int c2 = (7028);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((7028)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=7028 && c3<7842){
				int c2 = (7842);
					 	textBox5->Text = c2.ToString();
						int XPNeeded = ((7842)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=7842 && c3<8740){
				int c2 = (8740);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((8740)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=8740 && c3<9730){
				int c2 = (9730);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((9730)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=9730 && c3<10824){
				int c2 = (10824);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((10824)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=10824 && c3<12031){
				int c2 = (12031);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((12031)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=12031 && c3<13363){
				int c2 = (13363);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((13363)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=13363 && c3<14833){
				int c2 = (14833);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((14833)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=14833 && c3<16456){
				int c2 = (16456);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((16456)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=16456 && c3<18247){
				int c2 = (18247);
				 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((18247)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=18247 && c3<20224){
				int c2 = (20224);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((20224)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=20224 && c3<22406){
				int c2 = (22406);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((22406)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=22406 && c3<24815){
				int c2 = (24815);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((24815)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=24815 && c3<27473){
				int c2 = (27473);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((27473)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=27473 && c3<30408){
				int c2 = (30408);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((30408)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=30408 && c3<33648){
				int c2 = (33648);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((33648)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=33648 && c3<37224){
				int c2 = (37224);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((37224)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=37224 && c3<41171){
				int c2 = (41171);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((41171)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=41171 && c3<45529){
				int c2 = (45529);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((45529)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=45529 && c3<50339){
				int c2 = (50339);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((50339)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=50339 && c3<55649){
				int c2 = (55649);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((55649)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=55649 && c3<61512){
				int c2 = (61512);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((61512)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=61512 && c3<67983){
				int c2 = (67983);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((67983)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=67983 && c3<75127){
				int c2 = (75127);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((75127)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=75127 && c3<83014){
				int c2 = (83014);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((83014)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=83014 && c3<91721){
				int c2 = (91721);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((91721)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=91721 && c3<101333){
				int c2 = (101333);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((101333)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=101333 && c3<111945){
				int c2 = (111945);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((111945)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=111945 && c3<123660){
				int c2 = (123660);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((123660)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=123660 && c3<136594){
				int c2 = (136594);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((136594)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=136594 && c3<150872){
				int c2 = (150872);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((150872)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=150872 && c3<166636){
				int c2 = (166636);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((166636)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=166636 && c3<184040){
				int c2 = (184040);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((184040)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=184040 && c3<203254){
				int c2 = (203254);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((203254)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=203254 && c3<224466){
				int c2 = (224466);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((224466)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=224466 && c3<247886){
				int c2 = (247886);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((247886)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=247886 && c3<273742){
				int c2 = (273742);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((273742)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=273742 && c3<302228){
				int c2 = (302228);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((302228)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=302228 && c3<333804){
				int c2 = (333804);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((333804)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=333804 && c3<368599){
				int c2 = (368599);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((368599)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=368599 && c3<407015){
				int c2 = (407015);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((407015)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=407015 && c3<449428){
				int c2 = (449428);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((449428)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=449428 && c3<496254){
				int c2 = (496254);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((496254)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=496254 && c3<547953){
				int c2 = (547953);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((547953)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=547953 && c3<605032){
				int c2 = (605032);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((605032)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=605032 && c3<668051){
				int c2 = (668051);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((668051)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=668051 && c3<737637){
				int c2 = (737637);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((737637)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=737637 && c3<814445){
				int c2 = (814445);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((814445)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=814445 && c3<899257){
				int c2 = (899257);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((899257)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=899257 && c3<992895){
				int c2 = (992895);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((992895)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=992895 && c3<1096278){
				int c2 = (1096278);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((1096278)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=1096278 && c3<1210421){
				int c2 = (1210421);
				 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((1210421)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=1210421 && c3<1336443){
				int c2 = (1336443);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((1336443)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=1336443 && c3<1475581){
				int c2 = (1475581);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((1475581)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=1475581 && c3<1629200){
				int c2 = (1629200);
				 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((1629200)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=1629200 && c3<1798808){
				int c2 = (1798808);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((1798808)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=1798808 && c3<1986068){
				int c2 = (1986068);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((1986068)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=1986068 && c3<2192818){
				int c2 = (2192818);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((2192818)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=2192818 && c3<2421087){
				int c2 = (2421087);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((2421087)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=241087 && c3<2673114){
				int c2 = (2673114);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((2673114)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=2673114 && c3<2951373){
				int c2 = (2951373);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((2951373)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=29515373 && c3<3258594){
				int c2 = (3258594);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((3258594)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=3258594 && c3<3597792){
				int c2 = (3597792);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((3597792)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=3597792 && c3<3972294){
				int c2 = (3972294);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((3972294)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=3972294 && c3<4385776){
				int c2 = (4385776);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((4385776)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=4385776 && c3<4842295){
				int c2 = (4842295);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((4842295)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=4842295 && c3<5346332){
				int c2 = (5346332);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((5346332)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=5346332 && c3<5902831){
				int c2 = (5902831);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((5902831)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=5902831 && c3<6517253){
				int c2 = (6517253);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((6517253)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=6517253 && c3<7195629){
				int c2 = (7195629);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((7195629)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=7195629 && c3<7944614){
				int c2 = (7195629);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((7944614)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=7944614 && c3<8771558){
				int c2 = (8771558);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((8771558)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=8771558 && c3<9684557){
				int c2 = (9684557);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((9684557)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=9684557 && c3<10692629){
				int c2 = (10692629);
				 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((10692629)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=10692629 && c3<11805606){
				int c2 = (11805606);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((11805606)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=11805606 && c3<13034431){
				int c2 = (13034431);
					 	textBox5->Text = c2.ToString();
			            int XPNeeded = ((13034431)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c3>=13034431){
						int XPNeeded = ((c4)-(c3));
						this->textBox7->Text = XPNeeded.ToString();
			}
			else if(c4 == c3){
						int c2 = c4||c3;
						textBox5->Text= c2.ToString();
						int XPNeeded = ((c4)-(c3));
						textBox7->Text = XPNeeded.ToString();
						textBox10->Text = "Target Already Achieved!";
			 }
			 //XP TO LVL
				 if(c3>=0 && c3<83){
					 	int cbox = (1);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=83 && c3<174){
					 	int cbox = (2);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=174 && c3<276){
					 	int cbox = (3);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=276 && c3<388){
					 	int cbox = (4);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=388 && c3<512){
					 	int cbox = (5);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=83 && c3<650){
					 	int cbox = (6);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=650 && c3<801){
					 	int cbox = (7);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=801 && c3<969){
					 	int cbox = (8);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=969 && c3<1154){
					 	int cbox = (9);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=1154 && c3<1358){
					 	int cbox = (10);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=1358 && c3<1584){
					 	int cbox = (11);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=1584 && c3<1833){
					 	int cbox = (12);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=1833 && c3<2107){
					 	int cbox = (13);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=2107 && c3<2411){
					 	int cbox = (14);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=2411 && c3<2746){
					 	int cbox = (15);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=2746 && c3<3115){
					 	int cbox = (16);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=3115 && c3<3523){
					 	int cbox = (17);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=3523 && c3<3973){
					 	int cbox = (18);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=3973 && c3<4470){
					 	int cbox = (19);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=4470 && c3<5018){
					 	int cbox = (20);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=5018 && c3<5624){
					 	int cbox = (21);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=5624 && c3<6291){
					 	int cbox = (22);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=6291 && c3<7028){
					 	int cbox = (23);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=7028 && c3<7842){
					 	int cbox = (24);
						textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=7842 && c3<8740){
					 	int cbox = (25);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=8740 && c3<9730){
					 	int cbox = (26);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=9730 && c3<10824){
					 	int cbox = (27);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=10824 && c3<12031){
					 	int cbox = (28);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=12031 && c3<13363){
					 	int cbox = (29);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=13363 && c3<14833){
					 	int cbox = (30);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=14833 && c3<16456){
					 	int cbox = (31);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=16456 && c3<18247){
					 	int cbox = (32);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=18247 && c3<20224){
					 	int cbox = (33);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=20224 && c3<22406){
					 	int cbox = (34);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=22406 && c3<24815){
					 	int cbox = (35);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=24815 && c3<27473){
					 	int cbox = (36);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=27473 && c3<30408){
					 	int cbox = (37);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=30408 && c3<33648){
					 	int cbox = (38);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=33648 && c3<37224){
					 	int cbox = (39);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=37224 && c3<41171){
					 	int cbox = (40);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=41171 && c3<45529){
					 	int cbox = (41);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=45529 && c3<50339){
					 	int cbox = (42);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=50339 && c3<55649){
					 	int cbox = (43);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=55649 && c3<61512){
					 	int cbox = (44);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=61512 && c3<67983){
					 	int cbox = (45);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=67983 && c3<75127){
					 	int cbox = (46);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=75127 && c3<83014){
					 	int cbox = (47);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=83014 && c3<91721){
					 	int cbox = (48);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=91721 && c3<101333){
					 	int cbox = (49);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=101333 && c3<111945){
					 	int cbox = (50);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=111945 && c3<123660){
					 	int cbox = (51);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=123660 && c3<136594){
					 	int cbox = (52);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=136594 && c3<150872){
					 	int cbox = (53);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=150872 && c3<166636){
					 	int cbox = (54);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=166636 && c3<184040){
					 	int cbox = (55);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=184040 && c3<203254){
					 	int cbox = (56);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=203254 && c3<224466){
					 	int cbox = (57);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=224466 && c3<247886){
					 	int cbox = (58);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=247886 && c3<273742){
					 	int cbox = (59);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=273742 && c3<302228){
					 	int cbox = (60);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=302228 && c3<333804){
					 	int cbox = (61);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=333804 && c3<368599){
					 	int cbox = (62);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=368599 && c3<407015){
					 	int cbox = (63);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=407015 && c3<449428){
					 	int cbox = (64);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=449428 && c3<496254){
					 	int cbox = (65);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=496254 && c3<547953){
					 	int cbox = (66);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=547953 && c3<605032){
					 	int cbox = (67);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=605032 && c3<668051){
					 	int cbox = (68);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=668051 && c3<737637){
					 	int cbox = (69);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=737637 && c3<814445){
					 	int cbox = (70);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=814445 && c3<899257){
					 	int cbox = (71);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=899257 && c3<992895){
					 	int cbox = (72);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=992895 && c3<1096278){
					 	int cbox = (73);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=1096278 && c3<1210421){
					 	int cbox = (74);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=1210421 && c3<1336443){
					 	int cbox = (75);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=1336443 && c3<1475581){
					 	int cbox = (76);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=1475581 && c3<1629200){
					 	int cbox = (77);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=1629200 && c3<1798808){
					 	int cbox = (78);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=1798808 && c3<1986068){
					 	int cbox = (79);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=1986068 && c3<2192818){
					 	int cbox = (80);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=2192818 && c3<2421087){
					 	int cbox = (81);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=241087 && c3<2673114){
					 	int cbox = (82);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=2673114 && c3<2951373){
					 	int cbox = (83);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=29515373 && c3<3258594){
					 	int cbox = (84);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=3258594 && c3<3597792){
					 	int cbox = (85);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=3597792 && c3<3972294){
					 	int cbox = (86);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=3972294 && c3<4385776){
					 	int cbox = (87);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=4385776 && c3<4842295){
					 	int cbox = (88);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=4842295 && c3<5346332){
					 	int cbox = (89);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=5346332 && c3<5902831){
					 	int cbox = (90);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=5902831 && c3<6517253){
					 	int cbox = (91);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=6517253 && c3<7195629){
					 	int cbox = (92);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=7195629 && c3<7944614){
					 	int cbox = (93);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=7944614 && c3<8771558){
					 	int cbox = (94);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=8771558 && c3<9684557){
					 	int cbox = (95);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=9684557 && c3<10692629){
					 	int cbox = (96);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=10692629 && c3<11805606){
					 	int cbox = (97);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=11805606 && c3<13034431){
					 	int cbox = (98);
			            textBox4->Text = cbox.ToString();
				 }
				 else if(c3>=13034431){
						int cbox = (99);
						textBox4->Text = cbox.ToString();
				 }
		 }
private: System::Void textBox4_TextChanged(System::Object^  sender, System::EventArgs^  e) {
			int crntlvl;
			int crntxp;
			int targxp;
			Int32::TryParse(textBox4->Text,crntlvl);
			Int32::TryParse(textBox3->Text,crntxp);
			Int32::TryParse(textBox5->Text,targxp);

			if(crntlvl == 0){
				textBox10->Text = "Error! Current Level cannot be Less than 1!";
			}
			else if(crntlvl > 99){
				textBox10->Text = "Error! Current Level cannot be Greater than 99!";
			}
			else if(crntxp == targxp){
				textBox10->Text = "Target Already Achieved!";
			}
			else if(crntlvl == 1){
				crntxp = (0);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 2){
				crntxp = (83);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 3){
				crntxp = (174);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 4){
				crntxp = (276);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 5){
				crntxp = (388);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 6){
				crntxp = (512);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 7){
				crntxp = (650);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 8){
				crntxp = (801);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 9){
				crntxp = (969);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 10){
				crntxp = (1154);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 11){
				crntxp = (1358);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 12){
				crntxp = (1584);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 13){
				crntxp = (1833);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 14){
				crntxp = (2107);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 15){
				crntxp = (2411);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 16){
				crntxp = (2746);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 17){
				crntxp = (3115);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 18){
				crntxp = (3523);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 19){
				crntxp = (3973);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 20){
				crntxp = (4470);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 21){
				crntxp = (5018);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 22){
				crntxp = (5624);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 23){
				crntxp = (6291);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 24){
				crntxp = (7028);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 25){
				crntxp = (7842);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 26){
				crntxp = (8740);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 27){
				crntxp = (9730);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 28){
				crntxp = (10824);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 29){
				crntxp = (12031);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 30){
				crntxp = (13363);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 31){
				crntxp = (14833);
				this->textBox3->Text = crntxp.ToString();
				textBox10->Clear();
			}
			else if(crntlvl == 32){
				crntxp = (16456);
				this->textBox3->Text = crntxp.ToString();
				te

Please tell us the names and lines of the 2 textboxes and also the default value it places i.e. where you declare and initialise them. You can probably search it in your ide

It is also incredible how you manage to write 4000 lines of code and have a problem like this. Did you not test your program as you went along?

It is also incredible how you manage to write 4000 lines of code and have a problem like this. Did you not test your program as you went along?

Agreed. Also, as I suggested with your other difficulty, make a "toy" program that contains only the 2 textboxes and see if you can reproduce the problem that way.

Programming all of these magic numbers into your code is also going to spell disaster if you need to change anything. See if there is another way to approach your problems (e.g., storing some of your constants that vary with other values in parallel arrays or in a list). As it is, it's going to be difficult to maintain.

You may also want to hold off until you know some information about classes and use them to consolidate your code.

commented: N/A +11

Yes I ran it multiple times and didnt have that problem until I added the code to

private: System::Void textBox3_TextChanged(System::Object^ sender, System::EventArgs^ e)

And

private: System::Void textBox4_TextChanged(System::Object^ sender, System::EventArgs^ e)

I've tried making just a small form with two textboxes as suggested... Same problem :S

Thing is, textbox3 was fine, then when I added it to textbox4, Neither could be edited by the user..

The code was, if user enters 1-99 in textbox3, change textbox4 value to xxxxx... if user enters yyyyyy in textbox4, change textbox3 value to 1-99... and I think that is the problem.. but I dont know how to get around it..

I don't know if it would suit your project, but what if you had two arrow buttons in between your text boxes:

________________          _______________
|     1        |          |       2      |
|______________|  ->  <-  |______________|

The first arrow would convert from box 1 and place the calculated value in box 2, and the second arrow would take the value in 2 and place the calculated value in box 1. Then the circular dependency between the two wouldn't be needed. You'll probably need to have a couple of boolean values to determine whether the value in the box was freshly calculated and can be used in subsequent calculations. Again, just a suggestion.

Algorithms: They save lives.

commented: Thanks for the PSA! :P +6

I don't know if it would suit your project, but what if you had two arrow buttons in between your text boxes:

________________          _______________
|     1        |          |       2      |
|______________|  ->  <-  |______________|

The first arrow would convert from box 1 and place the calculated value in box 2, and the second arrow would take the value in 2 and place the calculated value in box 1. Then the circular dependency between the two wouldn't be needed. You'll probably need to have a couple of boolean values to determine whether the value in the box was freshly calculated and can be used in subsequent calculations. Again, just a suggestion.

Mhmm that's a great idea.. To be honest, I had it all in the calculate button so when it's pressed, the values get calculated n outputted in the textboxes.. That worked great but I wanted to ask here first about this loop because I didn't want the need to press the button.. I just wanted it o be imported and calculated instantly.. But your arrows are a great idea, I will only need one of them though, I will make the boxes update one way and use our idea to make it update the otherway without the loops.. Tyvm. Never cease to amaze me with hour responses

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.