zoukankan      html  css  js  c++  java
  • 通过消息获取 打印任务数量

    http://www.scalabium.com/faq/dct0047.htm

    D2007下未测试成功。

    If you need detect how many jobs are in the MS Windows print spooler, then you must handle a WM_SPOOLERSTATUS message. When job is added or deleted in the spooler querue, this message will be broadcast.
    So you must create a message handler for this message trapping:

    type
      TyourForm = class(TForm)
      private
        { Private declarations }
        procedure WMSpoolerStatus(var Msg: TWMSpoolerStatus);
          message WM_SPOOLERSTATUS;
      public
        { Public declarations }
      end;
    
    implementation
    
    {$R *.DFM}
    
    procedure TyourForm.WMSpoolerStatus(var Msg: TWMSpoolerStatus);
    begin
      ShowMessage('Now in the spooler a ' + IntToStr(msg.JobsLeft) + ' jobs';
      msg.Result := 0;
    end;



  • 相关阅读:
    test
    男神zyh的青睐
    HH的项链
    PAT刷题经验
    LaTeX常用数学符号
    Battle Over Cities Hard Version
    Cut
    文本生成器
    Explorer Space
    2021.04.21
  • 原文地址:https://www.cnblogs.com/CodeGear/p/4177721.html
Copyright © 2011-2022 走看看