Citation :
procedure TJvTrayIcon.BalloonHint(Title, Value: string;
BalloonType: TBalloonType; Delay: Integer);
//http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/Shell/reference/functions/shell_notifyicon.asp
begin
if AcceptBalloons then
begin
FTime := Now;
FTimeDelay := Delay div 1000;
Fic.uFlags := NIF_INFO;
with Fic do
StrPLCopy(szInfoTitle, Title, SizeOf(szInfoTitle) - 1);
with Fic do
StrPLCopy(szInfo, Value, SizeOf(szInfo) - 1);
Fic.uFlags := NIF_MESSAGE or NIF_ICON or NIF_INFO or NIF_TIP;
Fic.uTimeOut := Delay;
case BalloonType of
btError: Fic.dwInfoFlags := NIIF_ERROR;
btInfo: Fic.dwInfoFlags := NIIF_INFO;
btNone: Fic.dwInfoFlags := NIIF_NONE;
btWarning: Fic.dwInfoFlags := NIIF_WARNING;
end;
Shell_NotifyIcon(NIM_MODIFY,@Fic);
if Assigned(FOnBalloonShow) then
FOnBalloonShow(self);
end;
end;
|