unit u_returncust; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, bsSkinCtrls, StdCtrls; type Tfrmreturncust = class(TForm) bsSkinGroupBox1: TbsSkinGroupBox; bsSkinButton1: TbsSkinButton; Memo1: TMemo; procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); procedure bsSkinButton1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var frmreturncust: Tfrmreturncust; implementation uses u_main; {$R *.dfm} procedure Tfrmreturncust.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin if Memo1.Lines.Text='' then begin MessageDlg('±ØÐëÊäÈëÔ­Òò!',mtWarning,[mbOk],0); CanClose:=false; end else begin ModalResult:=mrOk; CanClose:=true; end; end; procedure Tfrmreturncust.bsSkinButton1Click(Sender: TObject); begin Close; end; end.