unit CheckPosForm; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ImgList, dximctrl; type TCheckPosFrm = class(TForm) btnOK: TButton; btnCancel: TButton; rgSelectPos: TRadioGroup; GroupBox1: TGroupBox; cbBillsQty: TCheckBox; cbDQQty: TCheckBox; procedure btnCancelClick(Sender: TObject); private { Private declarations } public { Public declarations } end; function CheckBillsPastePosition(var ABillsQty, ADQQty: Boolean; aPasteText: Boolean = False): Integer; implementation {$R *.dfm} uses ConstVarUnit; procedure TCheckPosFrm.btnCancelClick(Sender: TObject); begin Close; end; function CheckBillsPastePosition(var ABillsQty, ADQQty: Boolean; aPasteText: Boolean): Integer; var checkPosForm: TCheckPosFrm; begin Result := -1; checkPosForm := TCheckPosFrm.Create(nil); if not aPasteText then checkPosForm.rgSelectPos.Items.Delete(3) else checkPosForm.cbDQQty.Enabled := False; if checkPosForm.ShowModal = mrOK then begin Result := checkPosForm.rgSelectPos.ItemIndex; ABillsQty := checkPosForm.cbBillsQty.Checked; ADQQty := checkPosForm.cbDQQty.Checked; end; checkPosForm.Free; Application.ProcessMessages; end; end.