界面显示后延时运行代码《转》
procedure timerfun(handle:Thandle;msg:word;identer:word;dwtime:longword);stdcall; begin killtimer(handle,identer);//关闭定时器 //接下来为代码段end; procedure TForm1.FormShow(Sender: TObject); begin settimer(self.handle,0,1000,@timerfun); end;
加载界面后再运行代码段