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

How can I refresh list of printers ?

edited November 2004 in Devices
Hello,

In an application, I want to print a report on a printer, but this printer
is shared and it is not available. Well, I install another printer and I try
print with this new printer. But I can not do it because this printer is not
available in the printers list.

One solution it is that I close the application and I execute it again. But,
Exists it another solution???

Many thanks.

Josep Sol?

Comments

  • edited November 2004

    There is a global printer list object that will be rebuild the printer list
    when its Refresh method is called.

    Example:

    uses
    ppPrintr;

    begin

    ppPrinters.Refresh;

    end;




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



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited November 2004
    Hello
    This method works fine, so it refreshes the printer list.

    But if I just change the Units property then the program raises an exception
    (External exception).

    Any Idea????

    Thanks

  • edited November 2004
    Hi Josep,

    If you set your library path to RBuilder\Source and have your debugger stop
    on exceptions, are you able to see where the exception occurs?

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.