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