Hi Fabio,
For this purpose -- catching window messages -- just VFP code is not enough, that's true. Need an external library -- DLL, FLL or ActiveX control.
BINDEVENT() gives some opportunities, check VFP 8.0
System Tray Icon Sample at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_foxhelp/html/samsystem_tray_icon_example.aspThough in this a bit tricky fashion you may intercept only those window messages, which mapped to _SCREEN's or Form's events --
MouseWheel in mentioned example. Still for catching a
random window message you should use an external module.
I have a sample on my web site:
Using FoxTray ActiveX control: System Tray Icon and menu attached to VFP formhttp://www.news2news.com/vfp/?example=336&function=376ActiveX control written in VB is used. If you are interested I can share the source code. C/C++ solution is generally lighter (not MFC) and better -- I have none :).