Resolvi el problema :)
Gracias por su atencion,... Dejo el codigo de como lo solucione por si alguien le pasa igual,...
Código C++:
Ver original/*Todos los botones llevan el mismo codigo, solo cambia el numero que agregan*/
private: System::Void button9_Click(System::Object^ sender, System::EventArgs^ e)
{
this->T1->Text = this->T1->Text + "9";
}
private: System::Void Bresta_Click(System::Object^ sender, System::EventArgs^ e)
{
numero1 = Convert::ToDouble(this->T1->Text);
this->T1->Text="";
operacion ='-';
}
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void b0_Click(System::Object^ sender, System::EventArgs^ e)
{
this->T1->Text = this->T1->Text + "0";
}
private: System::Void Bsuma_Click(System::Object^ sender, System::EventArgs^ e)
{/*Aca se coloca el valor de la caja de texto a una variable,...
Como describi en mi algoritmo*/
numero1 = Convert::ToDouble(this->T1->Text);
this->T1->Text="";
operacion ='+';
/*Para todas las operaciones es el mismo codigo, solamente se cambia el signo*/
}
private: System::Void Bmulti_Click(System::Object^ sender, System::EventArgs^ e)
{
numero1 = Convert::ToDouble(this->T1->Text);
this->T1->Text="";
operacion ='*';
}
private: System::Void Bdiv_Click(System::Object^ sender, System::EventArgs^ e)
{
numero1 = Convert::ToDouble(this->T1->Text);
this->T1->Text="";
operacion ='/';
}
private: System::Void Bresultado_Click(System::Object^ sender, System::EventArgs^ e)
{/*Se asigna el Valor de la caja de texto a otra variable
y se determina que operacion realizar en base al signo
que contenga la variable "char operacion"*/
numero2 = Convert::ToDouble(this->T1->Text);
switch(operacion)
{
case '-': total = (numero1 - numero2);break;
case '+': total = (numero1 + numero2);break;
case '*': total = (numero1 * numero2);break;
case '/': total = (numero1 / numero2);break;
}
this->T1->Text=Convert::ToString(total);
}
private: System::Void Bpunto_Click(System::Object^ sender, System::EventArgs^ e)
{
this->T1->Text = this->T1->Text + ".";
}
private: System::Void BLimpiar_Click(System::Object^ sender, System::EventArgs^ e)
{
this->T1->Text="";
}
private: System::Void Bclr_Click(System::Object^ sender, System::EventArgs^ e)
{
this->T1->Text="";
numero1 = 0;
numero2 = 0;
total = 0;
}
};