0

I use the Jedi library and the component JvTrayIcon. It works fine. But when the program is run as a Citrix seamless application, the program doesn't receive any click events. I have search a lot but found only something about task bar icons and Delphi (Borland). I use Delphi 2010. Has anyone experience with this problem?

--Martin

  • 1
    Which messages does that tray notification listen to for clicks? – David Heffernan Aug 20 '12 at 12:06
  • A set of messages, and some adapting to Windows version http://jvcl.svn.sourceforge.net/viewvc/jvcl/trunk/jvcl/run/JvTrayIcon.pas?view=log – Arioch 'The Aug 20 '12 at 12:18
  • It seems to use ReadProcessMemory for icon positioning. That perhaps would not get marshalled in Citrix ? – Arioch 'The Aug 20 '12 at 12:23
  • @David Hefferman, it uses OnClick and OnDblClick. And has a popup menu attached. – user1611655 Aug 20 '12 at 12:35
  • 1
    ReadProcessMemory?! Oh dear that's utterly lame. There's no need for that. – David Heffernan Aug 20 '12 at 13:48
  • @user1611655 You talk about *events*, procedures of your program that the component calls. David talked about *messages* - integer constants that Windows GDI layer enqueues for the component reporting user activity. http://msdn.microsoft.com/en-us/library/windows/desktop/ms644943.aspx – Arioch 'The Aug 20 '12 at 13:50
  • 1
    Does the built-in [Delphi TTrayIcon](http://docwiki.embarcadero.com/CodeSamples/en/TTrayIcon_(Delphi)) as used in the linked example work? – LU RD Aug 20 '12 at 13:52
  • @David it is inherited from RxLib times, where one needed source-level compatibility from 16-bit Delphi 1 through to Delphi 5. I don't know exactly what it is for - there is URL of some article but i did not looked - but perhaps they had their reasons. Tray API is poor thing, and probably in earlier Windows it is even worse. However, for what io remember, starting with Delphi 5 there is stock VCL component and using RxLib/JediVCL might be avoided ? – Arioch 'The Aug 20 '12 at 13:53
  • @arioch notification icon api passes coords in the messages it sends – David Heffernan Aug 20 '12 at 13:56
  • Well, David, the link is above, if you wish - you may just grep it and make more informed suggestions. I just don't know and am not too interested either. – Arioch 'The Aug 20 '12 at 13:59
  • @arioch I would simply ditch the component and use something more sane. I also have no interest in studying it. – David Heffernan Aug 20 '12 at 16:42
  • @LU RD, I will test it tomorrow. – user1611655 Aug 21 '12 at 06:48
  • There is nothing currently logged in the jedi issue tracker that would cover this situation. Citrix and the "readprocessmemory" hack in JvTrayIcon do seem to be incompatible from what I can see. – Warren P Aug 21 '12 at 16:30
  • I tested the D2010 standard Tray icon, and everything I need, works; hover, and clicks. – user1611655 Aug 22 '12 at 19:55
  • @WarrenP well, if you request it, then #5963 :-) – Arioch 'The Aug 23 '12 at 07:41
  • @LURD - it seems one of us should post the answer to use stock VCL trayicon ;-) – Arioch 'The Aug 23 '12 at 07:42
  • @Arioch'The, answer posted, thanks. – LU RD Aug 23 '12 at 09:03
  • @Arioch 'The: ReadProcessMemory is only called if you use the TTrayIconEnumerator class yourself or if you call RefreshTray or TJvTrayIcon.GetIconRect explicitly. None of them are used by the component itself. So it can't be a problem with ReadProcessMemory as it isn't called. – Andreas Hausladen Aug 23 '12 at 22:37
  • @AndreasHausladen We did not saw code of the topic starter, and it seems none of us uses Citrix. So we can only trust that it failed for him. Those class and method are provided and are not discouraged. BTW, there is also procedure RefreshTray using the enumerator. But well, i have to admit that reducing JVCL in both depth and width is kinda idee fixe to me last years :-) – Arioch 'The Aug 24 '12 at 07:30

1 Answers1

1

Instead of using the jvcl tray icon, I suggest using the built in Delphi TTrayIcon.

LU RD
  • 32,988
  • 5
  • 71
  • 260