Error (LEADDlgColor Control) example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender) 
{
   LEADDlgColor1->EnableMethodErrors = true; 
     try
   {
      LEADDlgColor1->ShowBalanceColorsDlg ( NULL ); 
   }
   catch (...)
   {
      ShowMessage("Calling ShowBalanceColorsDlg method failed\n Error No " + IntToStr(LEADDlgColor1->Error) + "\n" + LEADDlgColor1->ErrorMsg); 
   }
}