unit JpegParams; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, RXSpin, TB97Ctls, RxGrdCpt; type TJPGUnit = class(TForm) JpegQuality: TRxSpinEdit; Label1: TLabel; Label2: TLabel; ProgressiveBox: TCheckBox; OK: TToolbarButton97; RxGradientCaption1: TRxGradientCaption; procedure OKClick(Sender: TObject); private { Private declarations } public { Public declarations } end; var JPGUnit: TJPGUnit; implementation uses MainUnit; {$R *.DFM} procedure TJPGUnit.OKClick(Sender: TObject); begin MainForm.compress_ratio := Round(JpegQuality.Value); MainForm.bProgressive := ProgressiveBox.Checked; Close; end; end.