4、e procedure WMTrayMsg(var Msg: TMessage);message WM_TRAYMSG; //声明托盘消息 procedure WMSysCommand(var Msg: TMessage);message WM_SYSCOMMAND; public { Public declarations } end; var Form1: TForm1; NotifyIcon: TNotifyIconData; //定义托盘图标结构体 implementation {$R *.
5、dfm} {------------------------------------------------------------------------------- Description: 窗体创建时,即创建托盘 -------------------------------------------------------------------------------} procedure TForm1.FormCreate(Sender: TObject); begin with NotifyIcon do begin cbSize := SizeOf(T