开发者

How to Print and get a confirmation

There is a way to print any content from a Winforms application and get a status of this operation.

The scenario that i have is a winforms bussiness application that need print a receipt of a bussiness transaction and if the receipt is printed with out problems, confirm the bussiness transaction.

If there area any problem (out of paper, paper jam, printer off line, etc) printing the 开发者_C百科transaction receipt, then roll back the bussiness transaction.

How can I resolve this scenario ?

tks in advance


I don't believe that Winforms will have what you are looking for as a first class feature, however you should be able to use SNMP to query a printers state, and monitor its page count via a background worker.

You can find an open source SNMP library here: http://sharpsnmplib.codeplex.com/

A more specific example using COM to get a printer's status can be found here: http://blog.crowe.co.nz/archive/2005/08/08/182.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜