简体   繁体   English

使用Delphi中的打印机单元

[英]Using the Printers Unit in Delphi

I want to access the Printers Unit in Delphi XE7. 我想访问Delphi XE7中的打印机单元。 I am not able to do this, because „the Printers Unit cannot be resolved“ as shown on this image: 我无法执行此操作,因为“打印机单元无法解析”,如此图所示:

在此输入图像描述

As a beginner in Delphi, I don't know what to do. 作为Delphi的初学者,我不知道该怎么做。 Don't judge me. 不要评判我。 Is there a way of adding a reference or something? 有没有办法添加引用或什么? Thank you. 谢谢。

In Delphi XE2, RTL/VCL/FMX unit names were updated with Unit Scope Names . 在Delphi XE2中,RTL / VCL / FMX单元名称已使用单元范围名称进行更新。 So you have to either: 所以你必须要么:

  1. use fully qualified unit names in your uses clause, like Vcl.Printers . 在您的uses子句中使用完全限定的单元名称,如Vcl.Printers

  2. go to Project Options -> Delphi Compiler -> Unit scope names and make sure Vcl is listed, then you can use just Printers in your uses clause. 转到Project Options - > Delphi Compiler - > Unit scope names并确保列出了Vcl ,然后您可以在uses子句中使用Printers

A new Vcl project has the following default Unit Scope Names: 新的Vcl项目具有以下默认的单元范围名称:

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`

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM