delphi 托盘程序_将Delphi应用程序放置在系统托盘中

delphi 托盘程序

Take a look at your Task Bar. See the area where the time is located? Are there any other icons there? The place is called the Windows System Tray. Would you like to place your Delphi application's icon there? Would you like that icon to be animated - or reflect the state of your application?

看一下您的任务栏。 看到时间所在的地区? 那里还有其他图标吗? 该地方称为Windows系统托盘。 您想在其中放置Delphi应用程序的图标吗? 您希望该图标具有动画效果-还是反映您的应用程序状态?

This would be useful for programs that are left running for long periods of time with no user interaction (background tasks you typically keep running on your PC all day long).

这对于长时间没有用户交互运行的程序很有用(您通常整天都在PC上运行的后台任务)。

What you can do is to make your Delphi applications look as if they are minimizing to the Tray (instead of to the Task Bar, right to the Win Start button) by placing an icon in the tray and simultaneously making your form(s) invisible.

您可以做的是通过在托盘中放置一个图标并同时使窗体不可见,使Delphi应用程序看起来像最小化到托盘(而不是任务栏,单击“开始”按钮)。 。

来吧 ( Let's Tray It )

Fortunately, creating an application that runs in the system tray is pretty easy - only one (API) function, Shell_NotifyIcon, is needed to accomplish the task.

幸运的是,创建在系统托盘中运行的应用程序非常容易-仅需要一个(API)函数Shell_NotifyIcon即可完成任务。

The function is defined in the ShellAPI unit and requires two parameters. The first is a flag indicating whether the icon is being added, modified, or removed, and the second is a pointer to a TNotifyIconData structure holding the informati

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值