Application User Model IDs (AppUserModelIDs) are used extensively by the taskbar in Windows 7 and later systems to associate processes, files, and windows with a particular application.
Legacy applications do not declare an explicit AppUserModelID. In that case, the system uses a series of heuristics to assign an internal AppUserModelID. Applications cannot retrieve a system-assigned AppUserModelID.
If an application uses an explicit AppUserModelID, it must also assign the same AppUserModelID to all running windows or processes, shortcuts, and file associations. It must also use that AppUserModelID when customizing its Jump List through ICustomDestinationList, and in any calls to SHAddToRecentDocs.
* * *
An explicit application ID better be created before the main application window shows on. When VFP main window appears on the screen, the system has already assigned a default application ID to this VFP instance.
After setting an explicit application ID, hide and show again VFP main window. That refreshes the jump list attached to the VFP taskbar icon. That simple:
_screen.Visible = .F.
_screen.Visible = .T.
Another option is using SCREEN=OFF and COMMAND settings in VFP configuration file. The COMMAND should start a program that sets application ID and then turns the main window on.
* * *
Setting application ID for an individual VFP top-level form requires access to the IPropertyStore interface. Apparently it can be done only through writing an external library. A fragment of such FLL is shown in C++ section of this code sample.
* * *
If a window owns an explicit application ID, calling the GetProp with this window handle and property name "{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3} 5" returns valid data handle (IPropertyStore ?).
Credits: PHP (4.4.9), an HTML-embedded scripting language,
MySQL (5.1.55-log), the Open Source standard SQL database,
AceHTML Freeware
Version 4, freeware HTML Editor of choice. Hosted by Korax Online Inc.