Home Devices
New Blog Posts: Merging Reports - Part 1 and Part 2

PrinterInfo - Local or Network

edited June 2006 in Devices
RB 10.03

Hi,

I need to known when a Printer is local o network printer. I am using
PrinterInfo.IsLocal but It doesn't work fine. I saw in your ppPDLG.pas where
it check ppPrinters.PrinterInfo[cbxPrinters.Items[liIndex]].IsLocal) to
assign a different image when printer is local, bu it doesn't work fine too.
Why ?

How can I do it ?

Thank you


for liIndex := 0 to cbxPrinters.Items.Count - 1 do
begin
if (ppPrinters.PrinterInfo[cbxPrinters.Items[liIndex]].IsLocal)
then
cbxPrinters.Items.Objects[liIndex] := TObject(0)
else
cbxPrinters.Items.Objects[liIndex] := TObject(1);
end;

Comments

  • edited June 2006

    What OS are you using? Windows XP?



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited June 2006
    XP Home Edition, but I tried it on Win2003 Server Edition too.



  • edited July 2006

    In my testing here with RB 10.03 and Windows XP, the local and network
    printers appear with the correct image.


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.