troubleshooting Question

Component TrayIcon

Avatar of rafaelrgl
rafaelrgl asked on
Delphi
6 Comments1 Solution407 ViewsLast Modified:
When I use this command on my program:

procedure TNucleo_TrayIcon.ShowBalloonTips(Titulo, MSG : String);
begin
  FData.cbSize := SizeOf(FData);
  FData.uFlags := NIF_INFO;
  strPLCopy(FData.szInfo, MSG, SizeOf(FData.szInfo) - 1);
  FData.DUMMYUNIONNAME.uTimeout := 3000;
  strPLCopy(FData.szInfoTitle, Titulo, SizeOf(FData.szInfoTitle) - 1);
  FData.dwInfoFlags := NIIF_INFO;     //NIIF_ERROR;  //NIIF_WARNING;
  Shell_NotifyIcon(NIM_MODIFY, @FData);
  FData.DUMMYUNIONNAME.uVersion := NOTIFYICON_VERSION;
  if not Shell_NotifyIcon(NIM_SETVERSION, @FData) then
  begin
    //ShowMessage('setversion fail');
  end;
end;


Before use this command above, it work normally but when i use it, Then this command below stop working:

  TrayIcon.MudaIcon(LoadIcon(hInstance,'CONECTADO'));

procedure TNucleo_TrayIcon.ModifyIcon;
begin
  if not (csDesigning in ComponentState) then
    Shell_NotifyIcon(NIM_MODIFY, @fData);
end;

Procedure TNucleo_TrayIcon.MudaIcon(Icon : HICON);
begin
    fData.hIcon := Icon;
    ModifyIcon;
end;
ASKER CERTIFIED SOLUTION
mokule

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros