右键点击工具栏,添加desktops工具栏,设置好你的IDE环境后可以保存成一个.dst文件dpk文件是package文件,编译后可以生成bpl包文件!

解决方案 »

  1.   

    >>dpk文件是package文件,编译后可以生成bpl包文件!能不能说清楚点它有什么作用啊?
      

  2.   

    F1!!!A package is a specially compiled dynamic-link library used by Delphi applications, the Delphi IDE, or both. Runtime packages provide functionality when a user runs an application. Design-time packages are used to install components in Delphi抯 IDE and to create special property editors for custom components. A single package can function at both design time and runtime, and design-time packages frequently work by referencing runtime packages in their requires clauses.To distinguish them from other DLLs, package libraries are stored in files that end with the .BPL (Borland package library) extension.
    Ordinarily, packages are loaded statically when an applications starts. But you can use the LoadPackage and UnloadPackage routines (in the SysUtils unit) to load packages dynamically.Note: When an application utilizes packages, the name of each packaged unit still must appear in the uses clause of any source file that references it.Each package is declared in a separate source file, which should be saved with the .DPK (Delphi package) extension to avoid confusion with other files containing Object Pascal code. A package source file does not contain type, data, procedure, or function declarations. Instead, it containsA name for the package.
    A list of other packages required by the new package. These are packages to which the new package is linked.
    A list of unit files contained by, or bound into, the package when it is compiled. The package is essentially a wrapper for these source-code units, which provide the functionality of the compiled BPL.A package declaration has the formpackage packageName;  requiresClause;
      containsClause;
    end.where packageName is any valid identifier. The requiresClause and containsClause are both optional. For example, the following code declares the VCLDB50 package.package VCLDB50;  requires VCL50;
      contains Db, Dbcgrids, Dbctrls, Dbgrids, ... ;
    end.The requires clause lists other, external packages used by the package being declared. It consists of the directive requires, followed by a comma-delimited list of package names, followed by a semicolon. If a package does not reference other packages, it does not need a requires clause.
    The contains clause identifies the unit files to be compiled and bound into the package. It consists of the directive contains, followed by a comma-delimited list of unit names, followed by a semicolon. Any unit name may be followed by the reserved word in and the name of a source file, with or without a directory path, in single quotation s; directory paths can be absolute or relative. For example,contains MyUnit in 'C:\MyProject\MyUnit.pas';Note: Thread-local variables (declared with threadvar) in a packaged unit cannot be accessed from clients that use the package.