Delphi 有类似PB setReDraw 功能函数吗?  控制窗体刷新,  不闪烁,不抖动...SetReDraw(false)
......
SetReDraw(true)

解决方案 »

  1.   

    有些控件提供了beginupdate/endupdate之类的函数
      

  2.   

    开双缓冲
    Self.DoubleBuffered := True;
      

  3.   

    類似這樣......begin
          CQ_JB_P_F:=TCQ_JB_P_F.Create(Self);
          if CQ_JB_P_F.ShowModal=mrok then
          begin
            cxGrid2.BeginUpdate;
            cxGrid2DBTableView1.BeginUpdate;
            for iLoop:=0 to cxGrid2DBTableView1.DataController.GetSelectedCount -1 do
            begin
              cxGrid2DBTableView1.Controller.FocusedRow:=cxGrid2DBTableView1.Controller.SelectedRows[iLoop];
              adoq_JB.Edit;
              adoq_JB.FieldByName('JBRQ').AsString:=FormatDateTime('yyyy/mm/dd',DT);
              adoq_JB.FieldByName('SJKSSJ').AsString:=FormatDateTime('hh:mm:ss',DtKSSJ);
              adoq_JB.FieldByName('SJJSSJ').AsString:=FormatDateTime('hh:mm:ss',DtJSSJ);
              adoq_JB.FieldByName('SJJBSS').AsString:=FormatDateTime('hh:mm:ss',FlGZSS);
              adoq_JB.FieldByName('JBYY').AsString:=StrJBYY;
              adoq_JB.FieldByName('JBDD').AsString:=StrID;
              adoq_JB.FieldByName('STATUS').AsString:=StrJBLX;
              adoq_JB.Post;
            end;
            cxGrid2DBTableView1.EndUpdate;
            cxGrid2.EndUpdate;
          end;
      

  4.   


      Self.BeginUpdate;
      //Do Something
      Self.EndUpdate;