来源:www.cncfan.com | 2006-1-8 | (有2227人读过)
设置属性如下: TrayIcon1.Visible = true; TrayIcon1.Hint= "my hint";
全部代码如下: ////////////////////////////////// // www.cncfan.com delphi 源码// ////////////////////////////////// unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, TrayIcon;
type TForm1 = class(TForm) TrayIcon1: TTrayIcon; Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;
var Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject); begin TrayIcon1.Visible:=true; trayIcon1.Hint:='www.cncfan.com提醒您,注意休息:)'; end;
end.
|