zoukankan      html  css  js  c++  java
  • ApplicationIdle

    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. 

  • 相关阅读:
    day_07 深浅拷贝
    day_06 再谈编码
    day_05 字典
    day_04 列表
    day_03 字符串
    HDU 1049 Climbing Worm
    HDU 1720 A+B Coming
    Pascal向C++的跨越
    B-Boxes
    喵哈哈村的狼人杀大战(4)
  • 原文地址:https://www.cnblogs.com/cb168/p/4690297.html
Copyright © 2011-2022 走看看