现在我的界面是在从一个界面进入另一个界面时,连主界面也跟着闪动几下,消失掉又出现,才最终显示要进入的界面,想问一下这是什么原因造成的,怎么解决,要不让人看的很不舒服。同时想问一下,那位有没有那种让办界面非常均匀的慢慢的显示出来的代码(我想把办界面的显示改成那样,现在用的不行,是跳跃性性的由中间向四边展开,要完整的源码)。以上,急,先行谢谢了,望高手指点一二,

解决方案 »

  1.   

    不好意思昨天有点事,以下即为打开的代码
    procedure TqtkdForm.SpeedButtonClick(Sender:Tobject);
    var ss:string;
        i,ii:integer;
    begin
         if activecontrol.ClassType<>Tbitbtn then exit;
         if copy(activecontrol.Name,1,3)<>'sp_' then exit;
         ii:=strtoint(copy(activecontrol.Name,4,3));
         i:=pos('[', bbtt[ii].Caption);
         ss:=copy(bbtt[ii].Caption,1,i-1);
         query1.Close;
         query1.SQL.Clear;
         query1.SQL.Add('select * from cantai where twbh=:twbh');
         query1.Parameters[0].Value:=ss;
         query1.Open;
         if query1czbz.AsBoolean=true then
         begin
           messagedlg('由于该餐台被其他用户锁定,无法继续操作!'+#13+'请等会再试!',mtwarning,[mbok],0);
           exit;
         end;
         try
           query1.Edit;
           query1czbz.AsBoolean:=true;
           query1.Post;
         except
           messagedlg('无法继续操作!'+#13+'请等会再试!',mtwarning,[mbok],0);
           exit;
         end;
         qtform.Edit6.Text:=query2ctbh.Value;
         qtform.labelededit5.Text:=query2ctmc.Value;
         qtform.edit7.Text:=query1twbh.Value;
         qtform.labelededit6.Text:=query1twmc.Value;
         qtmain.twbh:=query1twbh.AsString;
         IF query1.FieldByName('djh').AsInteger<>0 THEN qtmain.djhh:=query1.FieldByName('djh').AsString
         ELSE qtmain.djhh:='-1';
         query1.Close;
         qtmain.jzbz:='qt';
         timer1.Enabled:=false;
         qtform.showmodal;  //就是这个界面打开时有问题,影响所有的界面并关一下再开
         timer1.Enabled:=true;
         query1.Parameters[0].Value:=ss;
         query1.Open;
         query1.Edit;
         query1czbz.AsBoolean:=false;
         query1.Post;
         listview1det;
    end;