不会的,你自己定做一个窗体,post代码后面加上append旧可以的
除非你的按钮style是ok 型的

解决方案 »

  1.   

    看看
    //////////////////////////////////////////////////////////////////////////
    // 本单元为实施操作模块的部门信息操作子模块单元,连接DataMudel实现数据的
    // 添加操作
    // ysmstoneman
    // 2002-1-12
    ///////////////////////////////////////////////////////////////////////////
    unit UnitDeptApend;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls, Buttons, Mask, DBCtrls, ExtCtrls, DBNavPlus,DB;type
      TFormDeptApend = class(TForm)
        Label1: TLabel;
        DBEditDeptNo: TDBEdit;
        Label2: TLabel;
        DBEdit3: TDBEdit;
        Label3: TLabel;
        DBEdit4: TDBEdit;
        Label4: TLabel;
        DBEdit5: TDBEdit;
        SaveBtn: TBitBtn;
        CloseBtn: TBitBtn;
        DBNavPlus1: TDBNavPlus;
        procedure SaveBtnClick(Sender: TObject);
        procedure CloseBtnClick(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;//var
    //  FormDeptApend: TFormDeptApend;
    procedure showFormDeptApend;implementationuses UnitDB;{$R *.dfm}//下面过程实现动态创建窗口,并提供接口给部门信息操作子模块窗口调用,是全局过程
    procedure showFormDeptApend;
    begin
      with TFormDeptApend.Create(application) do
           showmodal;
    end;//以下过程用于保存操作
    procedure TFormDeptApend.SaveBtnClick(Sender: TObject);
    begin
      if DBEditDeptNo.Text='' then
      begin
         showMessage('部门编号不能为空!');
         Abort;
      end;  if DBDm.ADOTableDept.UpdateStatus=usInserted then
      begin
         DBDM.ADOTableDept.Post;
         showMessage('已经成功保存!');
      end
      else
      begin
         showMessage('你并没有做过任何修改?');
         DBDM.ADOTableDept.Cancel;
      end;   
    end;//当关闭按钮被单击
    procedure TFormDeptApend.CloseBtnClick(Sender: TObject);
    begin
        if DBDm.ADOTableDept.UpdateStatus=usInserted then
           if MessageDlg('你还没有保存刚才的添加操作,现在保存吗?',mtConfirmation, [mbYes, mbNo], 0) = mrYes then
              DBDM.ADOTableDept.Post
           else
              DBDM.ADOTableDept.Cancel
        else
           close;
    end;end.
      

  2.   

    你的Post按钮是不是TBitBtn?是的话把他的Kind属性设置成bkCustom,或者换成TButton。
      

  3.   

    还有ModalResult 属性改为mrNone。