Einzelnen Beitrag anzeigen

Benutzerbild von SirThornberry
SirThornberry
(Moderator)

Registriert seit: 23. Sep 2003
Ort: Bockwen
12.235 Beiträge
 
Delphi 2006 Professional
 
#7

Re: How to set use printer offline

  Alt 8. Nov 2009, 11:24
PrinterInfo.Attributes:=PrinterInfo.Attributes and PRINTER_ATTRIBUTE_WORK_OFFLINE The result of this is allways PRINTER_ATTRIBUTE_WORK_OFFLINE (or 0 if PRINTER_ATTRIBUTE_WORK_OFFLINE was not set before).

to remove the PRINTER_ATTRIBUTE_WORK_OFFLINE bits the expression has to be:
PrinterInfo.Attributes:=PrinterInfo.Attributes and not(PRINTER_ATTRIBUTE_WORK_OFFLINE)
Jens
Mit Source ist es wie mit Kunst - Hauptsache der Künstler versteht's
  Mit Zitat antworten Zitat