unit Edit;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, ExtCtrls;

type
  TEditForm = class(TForm)
    Label1: TLabel;
    NameEdit: TEdit;
    Label2: TLabel;
    ValueEdit: TEdit;
    btnOK: TBitBtn;
    btnCancel: TBitBtn;
    Image1: TImage;
    procedure btnOKClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  EditForm: TEditForm;

implementation

{$R *.dfm}

procedure TEditForm.btnOKClick(Sender: TObject);
begin
  if NameEdit.Text = '' then
    begin
      ModalResult := mrNone;
      Application.MessageBox('Name cannot be empty!', 'Warning', MB_OK+MB_ICONWARNING);
    end;
end;

end.
