ShowHolePunchRemoveDlg example for Delphi

procedure TForm1.ShowHolePunchRemoveDlg1Click(Sender: TObject); 
begin
   LEADDlgImgDoc1.MinHoleCount:= 2; 
   LEADDlgImgDoc1.MaxHoleCount:= 4; 
   LEADDlgImgDoc1.MinHoleWidth:= 0; 
   LEADDlgImgDoc1.MinHoleHeight:= 0; 
   LEADDlgImgDoc1.MaxHoleWidth:= 0; 
   LEADDlgImgDoc1.MaxHoleHeight:= 0; 
   LEADDlgImgDoc1.Location:= HOLEPUNCH_LEFT; 
   LEADDlgImgDoc1.WhiteAreaColor:= RGB ( 255, 0, 0 ); 
   LEADDlgImgDoc1.BlackAreaColor:= RGB ( 0, 0, 255 ); 
   LEADDlgImgDoc1.ProcessFlags:= HOLEPUNCH_USE_DPI; 
   LEADDlgImgDoc1.Location:= HOLEPUNCH_RIGHT; 
   LEADDlgImgDoc1.DlgFlags:= DLG_HOLEPUNCHREMOVE_AUTOPROCESS Or
                             DLG_HOLEPUNCHREMOVE_SHOW_PREVIEW Or
                             DLG_HOLEPUNCHREMOVE_SHOW_TOOL_ZOOMLEVEL; 

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