I am trying to implement a checkbox enabled textbox. I hit the backspace button to the beginning where there are no more characters left, and an error gets thrown. Im trying to use exception handling to eliminate the error but it is not working. This is the code i have:
Code:private: System::Void textBox3_TextChanged(System::Object * sender, System::EventArgs * e) { labelboardsub->Text = String::Concat(S"Subtotal: $ ", (120. * Double::Parse(textBox3->Text)).ToString() ); double x; try { x=this->textBox3->TextLength; } catch(FormatException *) { textBox3->TextLength==0; } }




Reply With Quote