procedure Tform_denltsh.timer_chaxddzhyTimer(Sender: TObject);
 var
  adoq:TADOQuery;
begin
  adoq := TADOQuery.Create(Nil);
  adoq.Connection := Form_dm.g_adocn_daod;
  With adoq do
   begin
    close;
    SQL.Clear;
    SQL.Add(sql_weixf);
    open;
    application.ProcessMessages;
    if RecordCount <> 0 then begin
      spbutton_daod.Font.Color:=clRed;
      spbutton_daod.Font.Color:=clBlack;
    end;
  end;
  这样显示不明显,怎样做?

解决方案 »

  1.   

    使用 BitBtn1 加上 Timer1 timer2 搞个 array
    时间上控制两种颜色的交替
    if 接到某一状态 
    then
    if XXXX then BitBtn1.font.color:=XXX
    else bitbtn1.font.color:=XXX;
      

  2.   

    swsw1(还可以) 
    你把代码都写出来了???
    闲呀你,为什么不让他自己写呢???!
      

  3.   

    procedure TForm1.Timer1Timer(Sender: TObject);
    begin
     if (r<=255) and (g<=255) and (b<=255) then
     begin
      button1.Font.Color:=RGB(r,g,b); //改变文字颜色。
      r:=r+1;
      g:=g+3;
      b:=b+9;
     end
     else
      begin
       r:=0;
       g:=0;
       b:=0;
      end; 
    end;
      

  4.   

    声明一个全局变量
    Var
     r,g,b:integer;
    procedure TForm1.Timer1Timer(Sender: TObject);
    begin
     if (r<=255) and (g<=255) and (b<=255) then
     begin
      button1.Font.Color:=RGB(r,g,b); //改变文字颜色。
      r:=r+1;
      g:=g+3;
      b:=b+9;
     end
     else
      begin
       r:=0;
       g:=0;
       b:=0;
      end; 
    end;
      

  5.   

    结贴,其实很简单

      if RecordCount <> 0 then begin
         if spbutton_daod.Font.Color=clRed then
            spbutton_daod.Font.Color:=clBlack
         else
            spbutton_daod.Font.Color:=clRed;
        end;
      end;
    。。即可