首页 > 代码库 > 通过消息获取 打印任务数量
通过消息获取 打印任务数量
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;
通过消息获取 打印任务数量
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。