Hola
Este es muy útil, así que no puede faltar en el programa.
Código Delphi
[-]
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, TrayIcon, ShellApi;
type
TForm1 = class(TForm)
Timer1: TTimer;
TrayIcon1: TTrayIcon;
procedure Timer1Timer(Sender: TObject);
procedure FormPaint(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
IconData : TNotifyIconData;
public
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
uses MMSystem;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
waveOutSetVolume(0, 0);
end;
procedure TForm1.FormPaint(Sender: TObject);
begin
with IconData do
begin
cbSize := sizeof(IconData);
Wnd := Handle;
uID := 100;
uFlags := NIF_MESSAGE + NIF_ICON + NIF_TIP;
uCallbackMessage := WM_USER + 1;
hIcon := Application.Icon.Handle;
StrPCopy(szTip, Application.Title);
end;
Shell_NotifyIcon(NIM_ADD, @IconData);
Hide;
TrayIcon1.Visible:=True;
end;
Saludos