Hi

Mi app use a systray.vcx
I compile
I lauch

That's OK : the app' icone is in the systray near the clock

I want to simulate a click on the icon :

In my VFP command window, I tape :
iHwnd = FindWindow(cNameApp+"9c000000" ,"Microsoft Visual FoxPro")
= sendMessage(iHwnd,0x020A,0x40010000,0x00000400)

That' OK

but if the code is in an exe, it doesnt work

The question is : Why the design mode allow to send a WM_MOUSEWHEEL
(0x020A) event and not in an exe ???

I known, the FFC class is a bit tricky : the creator said
*!*This is where the magic happens.
*!*This is an unabashed hack to allow us to get the full functionality
*!*of the Taskbar Notification Area ("System Tray") without having to
*!*use an external C++ library.
*!*To communicate with the systray, we tell it to send us messages via
*!*the MouseWheel event. (This is the only VFP event that doesn't alter
*!*or discard event data before firing the corresponding internal event.)

but my british is too poor to understand the next, it may be a way ?

*!*The second trick is that only the main VFP window will accept the events
*!*without checking to see if the event coordinates are invalid. (The
screen
*!* doesn't even need to be visible, so you can have SCREEN=OFF in your
*!* config.fpw file.) So we use VFP8's BINDEVENT() function to bind to the
*!* _SCREEN.MouseWheel event.
*!*This method sets up that communication path.

thank by advance
Olivier

Re: Problem with _systray.vcx : difference between prg and exe by BlackSabbath

BlackSabbath
Thu Jun 30 08:15:22 CDT 2005

Error found
thanks