Delphi2009之TTrayIcon
DELPH在 Vcl中提供了此控件,蛮好用的。使用超级简单:
1、打开Delphi2009,并建立一个VCL应用程序
2、从控件工具栏中的:Additional分页中找到TTrayIcon放在窗体上。
3、再从Standard中TPopupMenu,拉到窗体上
4、增加一个Popup菜单“Exit”:写入事件如下:
procedure TForm1.Exit1Click(Sender: TObject);
begin
Close;
end;
5、设置TTrayIcon的Visable 的属性为True
6、设置TTrayIcon的Icon属性
按F9,哈哈,效果来啦。