问题如题所示!各位大虾!能否给点意见?
解决方案 »
- fastreport 运行时弹出missing connection or connectionstring
- TClientSocket 通信问题 98下
- 最近在學delphi,散分了!24小時之後結帖,大家接分啊!
- SQL Server的日期字段怎么能够清空?
- 如何判断在TStringGrid中某中Cells中输入的值是否是Float型?
- 如何设置电脑日期格式?(在线等待)
- 关于字符加密问题?
- 支持断点续传----新手不可不看-高手更要看
- 为什么报表中的某些线(qrshape),在激光打印机中打印不出来,而在喷墨打印机中确正常???
- 多硬盘的多个分区的盘符是怎样指定的?
- 关于IdTCPServer的问题
- D7下创建CGI Stand-alone Executable程序,OnCreate的时候初始化一个TThreadList就出错
begin
Application.ProcessMessages;
end;
用多线程。
Application.ProcessMessages在其它的操作中为此变量赋值
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;
flag:boolean;
isbusy:boolean=false;
implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
var
i,aa:integer;
begin
aa:=0;
if not isbusy then
begin
i:=0; isbusy := true;
flag:=false;
Memo1.Lines.Clear;
while i>=0 do
begin
Application.ProcessMessages;
if flag then
begin
isbusy:=true;
break;
end;
memo1.Lines.Add(inttostr(i));
i:=i+1;
aa:=i;
end;
end
else
begin
flag:=false;
while aa>=0 do
begin
Application.ProcessMessages;
if flag then
begin
isbusy:=true;
break;
end;
memo1.Lines.Add(inttostr(aa));
aa:=aa+1;
end;
end;
end;procedure TForm1.Button2Click(Sender: TObject);
begin
flag:=true;
end;end.