Using the Printer Unit in Delphi

I want to access the printer unit in Delphi XE7. I cannot do this because "the printer unit cannot be resolved", as shown in this image:

enter image description here

As a newbie to Delphi, I don't know what to do. Do not judge me. Is there a way to add a link or something else? Thanks.

+5
source share
1 answer

In Delphi XE2, the names of the RTL / VCL / FMX modules have been updated with "Unit Names" . Therefore, you need to either:

  • use the full device names in the uses , for example Vcl.Printers .

  • go to Project Options Delphi Compiler Unit scope names and make sure that only Printers in the uses Vcl listed in the Vcl list.

The new Vcl project has the following default unit names:

 Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell` 
+7
source

All Articles