ShowGetTextDlg example for Delphi

procedure TForm1.ShowGetTextDlg1Click(Sender: TObject); 
var
   nRet: L_INT; 
   strSampleText: String; 
begin
   strSampleText:= 'LEADTOOLS!'; 

   LEADDlgEffect1.TextForegroundBitmap:= LEADImage2.Bitmap; 
   LEADDlgEffect1.SampleText:= strSampleText; 
   LEADDlgEffect1.TextFont.Color := RGB ( 0, 0, 255 ); 
   LEADDlgEffect1.TextHiliteColor:= RGB ( 255, 255, 255 ); 
   LEADDlgEffect1.ShadowColor:= RGB ( 128, 128, 128 ); 
   LEADDlgEffect1.TextStyle:= etsNormal; 
   LEADDlgEffect1.TextAlign:= etaHcenterVcenter; 
   LEADDlgEffect1.TextWordWrap:= False; 
   LEADDlgEffect1.TextAngle:= 450; 
   LEADDlgEffect1.ShadowXDepth:= 10; 
   LEADDlgEffect1.ShadowYDepth:= 10; 
   LEADDlgEffect1.TextUseForegroundImage:= True; 
   LEADDlgEffect1.DlgFlags:= DLG_TEXT_SHOW_PREVIEW Or
                             DLG_TEXT_AUTOPREVIEW  Or
                             DLG_TEXT_SAMPLETEXT   Or
                             DLG_TEXT_STYLE        Or
                             DLG_TEXT_COLOR        Or
                             DLG_TEXT_BORDERCOLOR  Or
                             DLG_TEXT_ALIGN        Or
                             DLG_TEXT_ANGLE        Or
                             DLG_TEXT_WORDWRAP     Or
                             DLG_TEXT_FONT         Or
                             DLG_TEXT_FOREIMAGE    Or
                             DLG_TEXT_BROWSEIMAGE  Or
                             DLG_TEXT_SHADOWCOLOR  Or
                             DLG_TEXT_SHADOW_X_Y; 

   LEADDlgEffect1.LEADImage:= LEADImage1; 
   LEADDlgEffect1.LEADDlgService:= LEADDlgService1; 
   nRet:= LEADDlgEffect1.ShowGetTextDlg ( Self ); 

   if ( nRet = SUCCESS_DLG_OK ) then
   begin
      LEADImage1.TextTop:= 50; 
      LEADImage1.TextLeft:= 50; 
      LEADImage1.TextWidth:= LEADImage1.DstWidth - 50; 
      LEADImage1.TextHeight:= LEADImage1.DstHeight - 50; 

      LEADImage1.TextAngle:= LEADDlgEffect1.TextAngle
      LEADImage1.TextAlign:= LEADDlgEffect1.TextAlign
      LEADImage1.TextStyle:= LEADDlgEffect1.TextStyle
      LEADImage1.TextWordWrap:= LEADDlgEffect1.TextWordWrap

      LEADImage1.ShadowColor:= LEADDlgEffect1.ShadowColor
      LEADImage1.ShadowXDepth:= LEADDlgEffect1.ShadowXDepth
      LEADImage1.ShadowYDepth:= LEADDlgEffect1.ShadowYDepth

      LEADImage1.TextHiliteColor:= LEADDlgEffect1.TextHiliteColor
      LEADImage1.TextFont:= LEADDlgEffect1.TextFont

      LEADImage1.DrawTextStr ( LEADDlgEffect1.SampleText, LEADImage2.Bitmap ); 
   end; 
end;