• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Delphi10.2 DPR文件

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

通过选择【Project | View Source】,可以看到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.


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Delphi之三汇模拟语音卡(SHT-8B/PCI/FAX)可复用源码发布时间:2022-07-18
下一篇:
【MATLAB】评价二值分割结果的函数发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap