Felipe Monteiro de Carvalho wrote:
TIcon isn't fully implemented on Windows so it doesn't give a HICON
handle that TTrayIcon needs.

See bug report: http://bugs.freepascal.org/view.php?id=10305

The wiki page explains how to make TTrayIcon work everywhere:
http://wiki.lazarus.freepascal.org/TrayIcon#Demonstration_program_1

thanks,

I tried this using an icon that was already inside a .rc file for windows. I use this for icon of main form in Windows anyway. I added an additional icon to the resource and followed the instructions on the wiki and still no success unfortunately.

  SystrayIcon.Icon.Handle :=
      LoadIcon(HINSTANCE, MAKEINTRESOURCE(101));

  SystrayIcon.Visible := true;

I simply added another icon to the resource and called it 101, but obviously that is not the way to go. Must the icon be in its own resource file or can it be placed in the existing resource file I already have?

Also, if its dependent on a handle, can I just load an icon from file and then pass the handle of that to the TTrayIcon.Icon.Handle property? I don't think this is the case either since I have tried this too with no success.

--
Warm Regards,

Lee

"Everything I needed to learn in life, I learned selling encyclopedias door to door."

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to