Menu

#6 Code to allow TStTrayIcon to re-show itself after an Explorer re-load

open
nobody
StTrayIcon (3)
7
2013-01-15
2003-01-29
Anonymous
No

Exported from Bugzilla, issue 3635.

--- Comment added on 8/7/02 4:30:09 PM ---
Customer Suggestion to have the Tray Icon re-show itself after an Explorer
re-load.

Uses a message that may not be available pre Win98/IE4?

-------------------->8 cut here 8<--------------------
TStCustomTrayIcon = class(TSsShellComponent)
protected{private}
...
{internal variables}
...
WM_TASKBARCREATED: Cardinal; {!!.02}

...

constructor TStCustomTrayIcon.Create(AOwner: TComponent);
...
begin
...
// Use the TaskbarCreated message available from Win98/IE4+ {!!.02}
WM_TASKBARCREATED := RegisterWindowMessage('TaskbarCreated'); {!!.02}
end;

...

procedure TStCustomTrayIcon.AppWndProc(var Msg : TMessage);
begin
...

if (Msg = WM_TASKBARCREATED) then begin {!!.02}
if Active then begin {!!.02}
IsActive := False; {!!.02}
AddToTray; {!!.02}
end; {!!.02}
end; {!!.02}
...
end;
-------------------->8 cut here 8<--------------------

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.