Delphi10.x DPR文件


本文整理自网络,侵删。

 
通过选择【Project | View Source】,可以看到DPR文件的基本面貌,操作如下:
dpr

默认的 Delphi 项目文件的内容如下:

复制代码
program Project1; {关键字 program}

uses              {uses 单元引用}
  Vcl.Forms,   //新的单元名称VCL限定
  Unit1 in 'Unit1.pas' {Form1};

{$R *.res}

begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  {默认已经MainForm显示于任务栏,而不是之前版本的Application}
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.
复制代码
通过查看官方的帮助文件,我们来了解下 Application.MainFormOnTaskbar 的含义,官方解释如下:

The MainFormOnTaskBar property controls how Windows taskbar buttons are handled by VCL.

If the property is true, a taskbar button represents the application's main form and displays its caption. If false, a taskbar button represents the application's (hidden) main window and bears the application's Title.

MainFormOnTaskBar must be true to use Windows Vista Aero effects. These include live taskbar thumbnails, Dynamic Windows, Windows Flip, and Windows Flip 3D.

If a change to default behavior is required, MainFormOnTaskBar should be set in the .dpr file after Application.Initialize and before main form creation. The MainFormOnTaskBar setting is intended to persist for the life of the application; later runtime changes of this property could result in unexpected behavior.

MainFormOnTaskBar defaults to True for applications created in Delphi 2007 and later products and False for earlier products.

The property can be applied to older applications. Note that it affects the Z-order of your MainForm in case your application depends on this. 

To update existing VCL applications, add the following line to the project's .dpr file after Application.Initialize;:

This line is automatically added to new projects.

来源:https://www.cnblogs.com/pchmonster/p/7623035.html

相关阅读 >>

Delphi响应wmi事件(响应网线断开)

Delphi 不管什么日期格式转换都不会错了

Delphi10.3.1安卓照相

Delphi 62 进制的简单实现

Delphi 实现检测线程类tthread是否结束

Delphi gettempdirectory 获取临时文件夹路径

Delphi实现屏幕截图、窗口截图、指定区域截图

Delphi取得文件图标并在tlistview中显示

Delphi xe 安卓开发黑屏的另一种解决办法

Delphi xe10.2 firedac 三种连接

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...