Binding to Windows Events for Fox windows

In a prior blog I described a demo I gave at Las Vegas Devcon that showed how to bind to Windows Events to respond to Windows Shell notifications.


Another demo I gave at Devcon was a simple program that bound to Windows Events to trap for window activation, deactivation, creation, etc. It showed a treeview listing all the currently active windows.


As the user opens, closes, or activates various windows, the treeview is automatically updated by responding to these events.


These demos require a new feature for BINDEVENTS() in VFP9 that allows you to run user code in response to Windows Events.


A customer asked for the source code for that demo: it’s shipped as a solution sample.


Start VFP9, Tools->Task Pane. Choose Solution Samples, New in VFP9, “Binding to windows Message Events”, “Fox Windows”





Comments (3)

  1. Vern says:


    The File/Folder Shell Events is returning an error message "Cannot find entry point SHILCreateFromPath in the dll" when you enable the event

  2. andrew says:

    I’m not getting that error when I run it on mine.

    Maybe it’s a version that you are running.

  3. Vern says:

    It works on my XP box with shell32.dll version 6.0.2800.1580 but not on my Win2k box running shell32.dll version 5.0.3900.6975.

Skip to main content