zoukankan      html  css  js  c++  java
  • delphi 不阻塞提示对话框

    {不阻塞提示对话框  TimeOut 超时参数,多久没有回应。超过时间则返回 IDTIMEOUT  默认0无限等待
    
    返回:
    IDABORT (3)
    Abort
    
    IDCANCEL (2)
    Cancel
    
    IDCONTINUE (11)
    Continue
    
    IDIGNORE (5)
    Ignore
    
    IDNO (7)
    No
    
    IDOK (1)
    OK
    
    IDRETRY (4)
    Retry
    
    IDTRYAGAIN (10)
    Try Again
    
    IDYES (6)
    Yes
    
    IDASYNC (32001 (0x7D01))
    The bWait parameter was FALSE, so the function returned without waiting for a response.
    
    IDTIMEOUT (32000 (0x7D00))
    The bWait parameter was TRUE and the time-out interval elapsed.
    }
    function NoblockingMessageBox(aMessage:string;Buttons: DWORD=MB_OK;TimeOut:integer=0):DWORD;
    begin
      WTSSendMessage(WTS_CURRENT_SERVER_HANDLE, WTSGetActiveConsoleSessionId,
        PChar(Application.Title), Length(Application.Title), PChar(aMessage), Length(aMessage), Buttons, TimeOut, Result, False);
    end;
    
    { *** *** *** *** *** *** *** *** *** *** *** *** 函数 *** *** *** *** *** *** *** *** *** *** *** *** }

    弹出对话框后,还会执行下面的代码。对话框独立于EXE外

  • 相关阅读:
    [转]人生哲理小故事
    取PE文件OriginalFilename解析VERSION资源
    [转]COM对象创建外部机制
    读书的几个步骤
    zoj 2412 Farm Irrigation
    HDU 1575 Tr A
    toj 2843 Diamonds
    HDU 1856 More is better
    toj 2841 Bitwise Reverse
    hdu 1213 How Many Tables
  • 原文地址:https://www.cnblogs.com/BTag/p/15735713.html
Copyright © 2011-2022 走看看