ShowGetGradientDlg example for Delphi

procedure TForm1.ShowGetGradientDlg1Click(Sender: TObject); 
var
   nRet: L_INT; 
begin

   LEADDlgEffect1.StartColor:= RGB ( 0, 0, 255 ); 
   LEADDlgEffect1.EndColor:= RGB ( 255, 0, 0 ); 
   LEADDlgEffect1.GradientStyle:= EFX_GRADIENT_ANGLE_TO_RT; 
   LEADDlgEffect1.GradientSteps:= 200; 
   LEADDlgEffect1.DlgFlags:= DLG_GRADIENT_SHOW_PREVIEW          Or
                             DLG_GRADIENT_AUTOPREVIEW           Or
                             DLG_GRADIENT_STARTCOLOR            Or
                             DLG_GRADIENT_ENDCOLOR              Or
                             DLG_GRADIENT_STEPS                 Or
                             DLG_GRADIENT_NO_TREEVIEW           Or
                             DLG_GRADIENT_CLASS_LINEAR          Or
                             DLG_GRADIENT_CLASS_ANGULAR         Or
                             DLG_GRADIENT_CLASS_RECTANGULAR     Or
                             DLG_GRADIENT_CLASS_ELLIPTICAL      Or
                             DLG_GRADIENT_CLASS_CONICAL; 

   LEADDlgEffect1.LEADImage:= LEADImage1; 
   LEADDlgEffect1.LEADDlgService:= LEADDlgService1; 

   nRet:= LEADDlgEffect1.ShowGetGradientDlg ( Self ); 

   if ( nRet = SUCCESS_DLG_OK ) then
   begin
      {output the results}
      Edit1.Text:= IntToStr ( LEADDlgEffect1.GradientStyle ); 
      Edit2.Text:= IntToStr ( LEADDlgEffect1.GradientSteps ); 
      Shape1.Brush.Color:= LEADDlgEffect1.StartColor
      Shape2.Brush.Color:= LEADDlgEffect1.EndColor
   end; 
end;