ShowBorderRemoveDlg example for Delphi

procedure TForm1.ShowBorderRemoveDlg1Click(Sender: TObject); 
begin
   LEADDlgImgDoc1.WhiteNoiseLength:= 9; 
   LEADDlgImgDoc1.BorderPercent:= 20; 
   LEADDlgImgDoc1.Variance:= 3; 
   LEADDlgImgDoc1.BorderToRemove:= BORDER_LEFT; 
   LEADDlgImgDoc1.ProcessFlags:= BORDER_USE_VARIANCE; 
   LEADDlgImgDoc1.DlgFlags:= DLG_BORDERREMOVE_AUTOPROCESS Or
                             DLG_BORDERREMOVE_SHOW_PREVIEW Or
                              DLG_BORDERREMOVE_SHOW_TOOL_ZOOMLEVEL; 

   LEADDlgImgDoc1.LEADImage:= LEADImage1; 
   LEADDlgImgDoc1.ShowBorderRemoveDlg ( Self ); 
end;