小编jsm*_*ith的帖子

在Delphi中延迟执行

调用程序结束后是否可以延迟启动程序?

procedure StartLoop;
begin
  DoSomething;
end;

procedure FormCreate(...);
begin
  if ParamStr(1)='start' then StartLoop;
end;
Run Code Online (Sandbox Code Playgroud)

StartLoop将被称为 FORMCREATE,和FORMCREATE将等待,并阻止进一步的执行不仅FORMCREATE本身的,而且之后(FormShow等)执行进一步的程序,并形成将不会显示,直到StartLoop将结束.

我需要等到FormCreate结束,然后运行StartLoop(不使用线程).

delphi delayed-execution

4
推荐指数
2
解决办法
508
查看次数

标签 统计

delayed-execution ×1

delphi ×1