界面显示后延时运行代码《转》
settimer(self.handle,0,5000,@timerfun); //定义引用 //执行事件 procedure timerfun(handle:Thandle;msg:word;identer:word;dwtime:longword);stdcall; begin showmessage('事件激活'); killtimer(handle,identer);//关闭定时器 end;
settimer(self.handle,0,5000,@timerfun); //定义引用 //执行事件 procedure timerfun(handle:Thandle;msg:word;identer:word;dwtime:longword);stdcall; begin showmessage('事件激活'); killtimer(handle,identer);//关闭定时器 end;