delphi 文件扩展名_Delphi中的文件扩展名

delphi 文件扩展名

Delphi employs a number of files for its configuration, some global to the Delphi environment, some project specific. Various tools in the Delphi IDE store data in files of other types.

Delphi使用许多文件进行配置,有些是Delphi环境的全局文件,有些是特定项目的文件。 Delphi IDE中的各种工具将数据存储在其他类型的文件中。

The following list describes the files and their filename extensions that Delphi creates for a typical stand-alone application, plus a dozen more. Also, get to know which Delphi generated files should be stored in a source control system.

下表描述了Delphi为典型的独立应用程序创建的文件及其文件扩展名,以及更多其他文件。 另外,还要了解应将哪些Delphi生成的文件存储在源代码控制系统中。

Delphi专案 ( Delphi Project Specific )

.PAS - Delphi Source FilePAS should be stored in Source ControlIn Delphi, PAS files are always the source code to either a unit or a form. Unit source files contain most of the code in an application. The unit contains the source code for any event handlers attached to the events of the form or the components it contains. We may edit .pas files using Delphi's code editor. Do not delete .pas files.

.PAS - Delphi源文件 PAS应该存储在源代码管理中在Delphi中,PAS文件始终是单元或表单的源代码 。 单元源文件包含应用程序中的大多数代码。 该单元包含附加到表单或其包含的组件的事件的任何事件处理程序的源代码。 我们可以使用Delphi的代码编辑器来编辑.pas文件。 不要删除.pas文件。

.DCU - Delphi Compiled UnitA compiled unit (.pas) file. By default, the compiled version of each unit is stored in a separate binary-format file with the same name as the unit file, but with the extension .DCU (Delphi compiled unit). For example unit1.dcu contains the code and data declared in the unit1.pas file. When you rebuild a project, individual units are not recompiled unless their source (.PAS) files have changed since the last compilation, or their .DCU files cannot be found. Safely delete .dcu file because Delphi recreates it when you compile the application.

.DCU - Delphi编译单元编译单元(.pas)文件。 默认情况下,每个单元的编译版本存储在一个单独的二进制格式文件中,该文件的名称与该单元文件的名称相同,但扩展名为.DCU(Delphi编译单元)。 例如,unit1.dcu包含在unit1.pas文件中声明的代码和数据。 重建项目时,除非重新编译单个单元的源(.PAS)文件或找不到其.DCU文件,否则不会重新编译各个单元。 安全删除.dcu文件,因为在编译应用程序时Delphi会重新创建该文件。

.DFM - Delphi FormDFM should be stored in Source ControlThese files are always paired with .pas files. A DFM file contains the details (properties) of the objects contained in a form. It can be view as text by right clicking on the form and selecting view as text from the pop-up menu. Delphi copies information in .dfm files into the finished .exe code file. Caution should be used in altering this file as changes to it could prevent the IDE from being able to load the form. Form files can be saved in either binary or text format. The Environment Options dialog lets you indicate which format you want to use for newly created forms. Do not delete .dfm files.

.DFM - Delphi Form DFM应该存储在源代码管理中这些文件始终与.pas文件配对。 DFM文件包含表单中包含的对象的详细信息(属性)。 右键单击表单,然后从弹出菜单中选择“文本视图”,可以将其作为文本视图。 Delphi将.dfm文件中的信息复制到完成的.exe代码文件中。 更改此文件时应谨慎,因为对其进行更改可能会阻止IDE加载表单。 表单文件可以二进制或文本格式保存。 通过“环境选项”对话框,您可以指示要用于新创建的表单的格式。 不要删除.dfm文件。

.DPR - Delphi ProjectDPR should be stored in Source ControlThe .DPR file is the central file to a Delphi project (one .dpr file per a project), actually a Pascal source file. It serves as the primary entry point for the executable. The DPR contains the references to the other files in the project and links forms with their associated units. Although we can modify the .DPR file, we should not modify it manually. Do not delete .DPR files.

.DPR - Delphi项目 DPR应该存储在源代码管理中.DPR文件是Delphi项目的中央文件(每个项目一个.dpr文件),实际上是Pascal源文件。 它充当可执行文件的主要入口点。 DPR包含对项目中其他文件的引用,并链接表单及其相关单位。 尽管我们可以修改.DPR文件,但我们不应该手动修改它。 不要删除.DPR文件。

.RES - Windows Resource FileA Windows resource file generated automatically by Delphi and required by the compilation process. This binary-format file contains the version info resource (if required) and the application’s main icon. The file may also contain other resources used within the application but these are preserved as is.

.RES - Windows资源文件由Delphi自动生成并在编译过程中需要的Windows资源文件。 该二进制格式的文件包含版本信息资源(如果需要)和应用程序的主图标。 该文件还可能包含应用程序内使用的其他资源,但这些资源将保留原样。

.EXE - Application ExecutableThe first time we build an application or a standard dynamic-link library, the compiler produces a .DCU file for each new unit used in your project; all the .DCU files in your project are then linked to create a single .EXE (executable) or .DLL file. This binary-format file is the only one (in most cases) you have to distribute to your users. Safely delete your projects .exe file because Delphi recreates it when you compile the application.

.EXE- 应用程序可执行文件首次构建应用程序或标准动态链接库时,编译器会为项目中使用的每个新单元生成一个.DCU文件。 然后,将项目中的所有.DCU文件链接在一起,以创建单个.EXE(可执行文件)或.DLL文件。 此二进制格式的文件是您必须分发给用户的唯一文件(在大多数情况下)。 安全删除项目.exe文件,因为在编译应用程序时Delphi会重新创建该文件。

.~?? - Delphi Backup FilesFiles with names ending in .~?? (e.g. unit2.~pa) are backup copies of modified and saved files. Safely delete those files at any time, however, you might want to keep the for recovering damaged programming.

。〜?? -Delphi Backup Files文件名以。〜??结尾的文件 (例如unit2。〜pa)是已修改和已保存文件的备份副本。 可以随时安全地删除这些文件,但是,您可能希望保留来恢复损坏的程序。

.DLL - Application ExtensionCode for dynamic link library. A dynamic-link library (DLL) is a collection of routines that can be called by applications and by other DLLs. Like units, DLLs contain shareable code or resources. But a DLL is a separately compiled executable that is linked at runtime to the programs that use it. Do not delete a .DLL file unless you wrote it. Go see DLL's and Delphi for more information on programming.

.DLL- 动态链接库的 应用程序扩展代码。 动态链接库(DLL)是例程的集合,可以由应用程序和其他DLL调用这些例程。 像单元一样,DLL包含可共享的代码或资源。 但是DLL是一个单独编译的可执行文件,在运行时链接到使用它的程序。 除非您编写了.DLL文件,否则不要删除它。 有关编程的更多信息,请参见DLL和Delphi

.DPK - Delphi PackageDPK should be stored in Source ControlThis file contains the source code for a package, which is most often a collection of multiple units. Package source files are similar to project files, but they are used to construct special dynamic-link libraries called packages. Do not delete .dpk files.

.DPK - Delphi程序包 DPK应存储在源代码管理中此文件包含程序包的源代码,该程序包通常是多个单元的集合。 软件包源文件与项目文件相似,但是它们用于构造称为软件包的特殊动态链接库。 不要删除.dpk文件。

.DCPThis binary image file consists of the actual compiled package. Symbol information and additional header information required by the IDE are all contained within the .DCP file. The IDE must have access to this file in order to build a project. Do not delete .DCP files.

.DCP此二进制映像文件由实际的已编译程序包组成。 IDE所需的符号信息和其他标题信息都包含在.DCP文件中。 IDE必须有权访问此文件才能构建项目。 不要删除.DCP文件。

.BPL or .DPLThis is the actual design-time or run-time package. This file is a Windows DLL with Delphi-specific features integrated into it. This file is essential for the deployment of an application that uses a package. In version 4 and above this is 'Borland package library' in version 3 it's 'Delphi package library'. See BPL vs. DLL for more information on programming with packages.

.BPL或.DPL这是实际的设计时或运行时包 。 该文件是Windows DLL,其中集成了特定于Delphi的功能。 该文件对于使用包的应用程序的部署至关重要。 在版本4和更高版本中,这是版本3中的“ Borland软件包库”,它是“ Delphi软件包库”。 有关使用程序包进行编程的更多信息,请参见BPL与DLL

The following list describes the files and their filename extensions that Delphi IDE creates for a typical stand-alone application

以下列表描述了Delphi IDE为典型的独立应用程序创建的文件及其文件扩展名

   IDE Specific.BPG, .BDSGROUP - Borland Project Group (Borland Developer Studio Project Group)BPG should be stored in Source ControlCreate project groups to handle related projects at once. For example, you can create a project group that contains multiple executable files such as a .DLL and an .EXE.

IDE特定的 .BPG,.BDSGROUP - Borland项目组 ( Borland Developer Studio项目组 )BPG应该存储在Source ControlCreate项目组中以立即处理相关项目。 例如,您可以创建一个项目组,其中包含多个可执行文件,例如.DLL和.EXE。

.DCRDCR should be stored in Source ControlDelphi component resource files contain a component's icon as it appears on the VCL palette. We may use .dcr files when construction our own custom components. Do not delete .dpr files.

.DCR DCR应该存储在Source ControlDelphi组件资源文件中,其中包含组件图标,该图标显示在VCL面板上。 构建自己的自定义组件时,我们可能会使用.dcr文件。 不要删除.dpr文件。

.DOFDOF should be stored in Source ControlThis text file contains the current settings for project options, such as compiler and linker settings, directories, conditional directives, and command-line parameters. The only reason to delete .dof file is to revert to standard options for a project.

.DOF DOF应存储在源代码管理中此文本文件包含项目选项的当前设置,例如编译器和链接器设置,目录,条件指令和命令行参数 。 删除.dof文件的唯一原因是还原到项目的标准选项。

.DSKThis text file stores information about the state of your project, such as which windows are open and what position they are in. This allows you to restore your project’s workspace whenever you reopen the Delphi project.

.DSK该文本文件存储有关项目状态的信息,例如哪些窗口处于打开状态以及它们处于什么位置。这使您可以在每次重新打开Delphi项目时恢复项目的工作区。

.DROThis text file contains information about the object repository. Each entry in this file contains specific information about each available item in the object repository.

.DRO此文文件包含有关对象库的信息。 该文件中的每个条目都包含有关对象库中每个可用项目的特定信息。

.DMTThis proprietary binary file contains the shipped and user-defined menu templates information.

.DMT此专有二进制文件包含附带的和用户定义的菜单模板信息。

.TLBThe file is a proprietary binary type library file. This file provides a way for identifying what types of objects and interfaces are available on an ActiveX server. Like a unit or a header file the .TLB serves as a repository for necessary symbol information for an application.

.TLB该文件是专有的二进制类型库文件。 该文件提供了一种识别ActiveX服务器上可用的对象和接口类型的方法。 像单元或头文件一样 ,.TLB充当应用程序必要符号信息的存储库。

.DEMThis text file contains some standard country-specific formats for a TMaskEdit component.

.DEM此文本文件包含TMaskEdit组件的某些标准国家/地区特定格式。

The list of the file extensions you see when Developing with Delphi continues ....

使用Delphi进行开发时看到的文件扩展名列表继续....

.CABThis is the file format that Delphi offers its users for web deployment. The cabinet format is an efficient way to package multiple files.

.CAB这是Delphi为用户提供的用于Web部署的文件格式。 机柜格式是打包多个文件的有效方法。

.DBFiles with this extension are standard Paradox files.

具有此扩展名的.DB文件是标准的Paradox文件。

.DBFFiles with this extension are standard dBASE files.

具有此扩展名的.DBF文件是标准dBASE文件。

.GDBFiles with this extension are standard Interbase files.

具有此扩展名的.GDB文件是标准的Interbase文件。

.DBIThis text file contains initialization information for the Database Explorer.

.DBI此文本文件包含数据库资源管理器的初始化信息。

   CautionNever delete files with names ending in .dfm, .dpr, or .pas, unless you want to throw away your project. These files contain the application's properties and source code. When backing up an application, these are the critical files to save.

注意除非要丢弃项目,否则切勿删除名称以.dfm,.dpr或.pas结尾的文件。 这些文件包含应用程序的属性和源代码。 备份应用程序时,这些是要保存的关键文件。

翻译自: https://www.thoughtco.com/filename-extensions-in-delphi-1057643

delphi 文件扩展名

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
function MoveFile(const sName, dName: string): Boolean; {* 移动文件、目录,参数为源、目标名} procedure FileProperties(const FName: string); {* 打开文件属性窗口} function OpenDialog(var FileName: string; Title: string; Filter: string; Ext: string): Boolean; {* 打开文件框} function FormatPath(APath: string; Width: Integer): string; {* 缩短显示不下的长路径名} function GetRelativePath(Source, Dest: string): string; {* 取两个目录的相对路径,注意串尾不能是'\'字符!} procedure RunFile(const FName: string; Handle: THandle = 0; const Param: string = ''); {* 运行一个文件} function WinExecAndWait32(FileName: string; Visibility: Integer = SW_NORMAL): Integer; {* 运行一个文件并等待其结束} function AppPath: string; {* 应用程序路径} function GetWindowsDir: string; {* 取Windows系统目录} function GetWinTempDir: string; {* 取临时文件目录} function AddDirSuffix(Dir: string): string; {* 目录尾加'\'修正} function MakePath(Dir: string): string; {* 目录尾加'\'修正} function IsFileInUse(FName: string): Boolean; {* 判断文件是否正在使用} function GetFileSize(FileName: string): Integer; {* 取文件长度} function SetFileDate(FileName: string; CreationTime, LastWriteTime, LastAccessTime: TFileTime): Boolean; {* 设置文件时间} function GetFileDate(FileName: string; var CreationTime, LastWriteTime, LastAccessTime: TFileTime): Boolean; {* 取文件时间} function FileTimeToLocalSystemTime(FTime: TFileTime): TSystemTime; {* 文件时间转本地时间} function LocalSystemTimeToFileTime(STime: TSystemTime): TFileTime; {* 本地时间转文件时间} function GetFileIcon(FileName: string; var Icon: TIcon): Boolean; {* 取得与文件相关的图标,成功则返回True} function CreateBakFile(FileName, Ext: string): Boolean; {* 创建备份文件} function Deltree(Dir: string): Boolean; {* 删除整个目录} function GetDirFiles(Dir: string): Integer; {* 取文件文件数} type TFindCallBack = procedure(const FileName: string; const Info: TSearchRec; var Abort: Boolean); {* 查找指定目录下文件的回调函数} procedure FindFile(const Path: string; const FileName: string = '*.*'; Proc: TFindCallBack = nil; bSub: Boolean = True; const bMsg: Boolean = True); {* 查找指定目录下文件} function OpenWith(const FileName: string): Integer; {* 文件打开方式} //----------------------------------------------------------------------------// //扩展的字符串操作函数 // //----------------------------------------------------------------------------// function InStr(const sShort: string; const sLong: string): Boolean; {* 判断s1是否包含在s2} function IntToStrEx(Value: Integer; Len: Integer; FillChar: Char = '0'): string; {* 扩展整数转字符串函数} function IntToStrSp(Value: Integer; SpLen: Integer = 3; Sp: Char = ','): string; {* 带分隔符的整数-字符转换} function ByteToBin(Value: Byte): string; {* 字节转二进制串} function StrRight(Str: string; Len: Integer): string; {* 返回字符串右边的字符} function StrLeft(Str: string; Len: Integer): string; {* 返回字符串左边的字符} function Spc(Len: Integer): string; {* 返回空格串} procedure SwapStr(var s1, s2: string); {* 交换字串} function LinesToStr(const Lines: string): string; {* 多行文本转单行(换行符转'\n')} function StrToLines(const Str: string): string; {* 单行文本转多行('\n'转换行符)} //----------------------------------------------------------------------------// //扩展的对话框函数 // //----------------------------------------------------------------------------// procedure InfoDlg(Mess: string; Caption: string = SCnInformation; Flags: Integer = MB_OK + MB_ICONINFORMATION); {* 显示提示窗口} function InfoOk(Mess: string; Caption: string = SCnInformation): Boolean; {* 显示提示确认窗口} procedure ErrorDlg(Mess: string; Caption: string = SCnError); {* 显示错误窗口} procedure WarningDlg(Mess: string; Caption: string = SCnWarning); {* 显示警告窗口} function QueryDlg(Mess: string; Caption: string = SCnInformation): Boolean; {* 显示查询是否窗口} //----------------------------------------------------------------------------// //扩展日期时间操作函数 // //----------------------------------------------------------------------------// function GetYear(Date: TDate): Integer; {* 取日期年份分量} function GetMonth(Date: TDate): Integer; {* 取日期月份分量} function GetDay(Date: TDate): Integer; {* 取日期天数分量} function GetHour(Time: TTime): Integer; {* 取时间小时分量} function GetMinute(Time: TTime): Integer; {* 取时间分钟分量} function GetSecond(Time: TTime): Integer; {* 取时间秒分量} function GetMSecond(Time: TTime): Integer; {* 取时间毫秒分量} //----------------------------------------------------------------------------// //位操作函数 // //----------------------------------------------------------------------------// type TByteBit = 0..7; {* Byte类型位数范围} TWordBit = 0..15; {* Word类型位数范围} TDWordBit = 0..31; {* DWord类型位数范围} procedure SetBit(var Value: Byte; Bit: TByteBit; IsSet: Boolean); overload; {* 设置二进制位} procedure SetBit(var Value: WORD; Bit: TWordBit; IsSet: Boolean); overload; {* 设置二进制位} procedure SetBit(var Value: DWORD; Bit: TDWordBit; IsSet: Boolean); overload; {* 设置二进制位} function GetBit(Value: Byte; Bit: TByteBit): Boolean; overload; {* 取二进制位} function GetBit(Value: WORD; Bit: TWordBit): Boolean; overload; {* 取二进制位} function GetBit(Value: DWORD; Bit: TDWordBit): Boolean; overload; {* 取二进制位} //----------------------------------------------------------------------------// //系统功能函数 // //----------------------------------------------------------------------------// procedure MoveMouseIntoControl(AWinControl: TControl); {* 移动鼠标到控件} function DynamicResolution(x, y: WORD): Boolean; {* 动态设置分辨率} procedure StayOnTop(Handle: HWND; OnTop: Boolean); {* 窗口最上方显示} procedure SetHidden(Hide: Boolean); {* 设置程序是否出现在任务栏} procedure SetTaskBarVisible(Visible: Boolean); {* 设置任务栏是否可见} procedure SetDesktopVisible(Visible: Boolean); {* 设置桌面是否可见} procedure BeginWait; {* 显示等待光标} procedure EndWait; {* 结束等待光标} function CheckWindows9598: Boolean; {* 检测是否Win95/98平台} //----------------------------------------------------------------------------// //其它过程 // //----------------------------------------------------------------------------// function TrimInt(Value, Min, Max: Integer): Integer; overload; {* 输出限制在Min..Max之间} function IntToByte(Value: Integer): Byte; overload; {* 输出限制在0..255之间} function InBound(Value: Integer; Min, Max: Integer): Boolean; {* 判断整数Value是否在Min和Max之间} procedure CnSwap(var A, B: Byte); overload; {* 交换两个数} procedure CnSwap(var A, B: Integer); overload; {* 交换两个数} procedure CnSwap(var A, B: Single); overload; {* 交换两个数} procedure CnSwap(var A, B: Double); overload; {* 交换两个数} function RectEqu(Rect1, Rect2: TRect): Boolean; {* 比较两个Rect是否相等} procedure DeRect(Rect: TRect; var x, y, Width, Height: Integer); {* 分解一个TRect为左上角坐标x, y和宽度Width、高度Height} function EnSize(cx, cy: Integer): TSize; {* 返回一个TSize类型} function RectWidth(Rect: TRect): Integer; {* 计算TRect的宽度} function RectHeight(Rect: TRect): Integer; {* 计算TRect的高度} procedure Delay(const uDelay: DWORD); {* 延时} procedure BeepEx(const Freq: WORD = 1200; const Delay: WORD = 1); {* 在Win9X下让喇叭发声} procedure ShowLastError; {* 显示Win32 Api运行结果信息} function GetHzPy(const AHzStr: string): string; {* 取汉字的拼音} function SoundCardExist: Boolean; {* 声卡是否存在}

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值