首页 > 移动平台 > 详细

ApplicationIdle

时间:2015-07-30 20:45:12      阅读:207      评论:0      收藏:0      [点我收藏+]

ApplicationIdle

不忙的时候调用此事件

::Fmx::Forms::Application->OnIdle = ApplicationIdle;

 

void __fastcall TForm1::ApplicationIdle(TObject *Sender, bool &Done)
{
    ButtonStart->Enabled = !DSServer()->Started;
    ButtonStop->Enabled = DSServer()->Started;
    EditPort->Enabled = !DSServer()->Started;
}

Occurs when an application becomes idle.

Write an OnIdle event handler to perform special processing when an application is idle. An application is idle when it is not processing code. For example, an application is idle when it is waiting for input from the user.

OnIdle is called only once, as the application transitions into an idle state. It is not called continuously unless the Done parameter is set to false. Applications that set Done to false consume an inordinate amount of CPU time, which affects overall system performance. 

ApplicationIdle

原文:http://www.cnblogs.com/cb168/p/4690297.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!