ShowBorderRemoveDlg example for C++ Builder

void __fastcall TForm1::ShowBorderRemoveDlg1Click(TObject *Sender) 
{
   LEADDlgImgDoc1->WhiteNoiseLength =93; 
   LEADDlgImgDoc1->BorderPercent = 20; 
   LEADDlgImgDoc1->Variance = 3; 
   LEADDlgImgDoc1->BorderToRemove = BORDER_LEFT; 
   LEADDlgImgDoc1->ProcessFlags = BORDER_USE_VARIANCE; 
   LEADDlgImgDoc1->DlgFlags = DLG_BORDERREMOVE_AUTOPROCESS |
                             DLG_BORDERREMOVE_SHOW_PREVIEW |
                             DLG_BORDERREMOVE_SHOW_TOOL_ZOOMLEVEL; 

   LEADDlgImgDoc1->LEADImage= LEADImage1; 
   LEADDlgImgDoc1->ShowBorderRemoveDlg ( this ); 
}