void __fastcall TForm1::Button1Click(TObject *Sender)
{
try
{
Form1->Caption = IntToStr(StrToInt(Edit1->Text) * StrToInt(Edit2->Text));
}
catch(...)
{
ShowMessage("You must specify integer values. Please try again.");
}
}
void __fastcall TForm1::Button1Click(TObject *Sender)
{
try
{
Form1->Caption = IntToStr(StrToInt(Edit1->Text) * StrToInt(Edit2->Text));
}
catch(...)
{
ShowMessage("You must specify integer values. Please try again.");
}
}
转载于:https://www.cnblogs.com/xe2011/archive/2012/06/03/90c5db47a40676297b245ea1b1d42315.html