L
LikeDFW
Unregistered / Unconfirmed
GUEST, unregistred user!
您好,请看如下代码:
a:// Application.ProcessMessages ; //接收系统消息
while (i < 10001) do
if b then
begin
j := 100*i ;
b: Application.ProcessMessages ; //接收系统消息
Label1.Caption := IntToStr(j) ;
c:// Application.ProcessMessages ; //接收系统消息
Sleep(100) ;
Inc(i) ;
end
else Break ;
用 Application.ProcessMessages 可以接收系统消息,但为何在上例中 ,
如果 在 b 或者 c 处用 Application.ProcessMessages ,Label1可以同步显示 ;
但如果 去掉 b,c 两处,加在 a 处 ,Label1 不能同步显示 ; 请教为何 ?
同时请教 Application.ProcessMessages的作用 ,谢谢
a:// Application.ProcessMessages ; //接收系统消息
while (i < 10001) do
if b then
begin
j := 100*i ;
b: Application.ProcessMessages ; //接收系统消息
Label1.Caption := IntToStr(j) ;
c:// Application.ProcessMessages ; //接收系统消息
Sleep(100) ;
Inc(i) ;
end
else Break ;
用 Application.ProcessMessages 可以接收系统消息,但为何在上例中 ,
如果 在 b 或者 c 处用 Application.ProcessMessages ,Label1可以同步显示 ;
但如果 去掉 b,c 两处,加在 a 处 ,Label1 不能同步显示 ; 请教为何 ?
同时请教 Application.ProcessMessages的作用 ,谢谢