1) you can SKIP FOR glBoolvalue - a public variable and then change that. It can even be a function call returning a boolean .T. or .F., but you won't define the times this is evaluated nor will the change of a public variable trigger the change of the menu item. The SKIP value will at least be evaluated when the popup is drawn and when you hover the menu item with the mouse. My experiences with this are from applying SKIP for conditions by user permissions and for that matter I created a caching mechanism so a call to the permission function would answer with a cached value rather than looking up user permission. That's the only way to cope with the amount of calls to not burden the application mainly doing user permission function calls. The cache value has a lifetime of a few minutes only to enable enough control about user permissions.
In the end, it is possible as determining EMPTY(_CLIPBOARD) is quite a fast operation, is local and thus needs no caching, but experiment with SKIP FOR EMPTY(_CLIPBOARD) yourself, I won't guarantee it to work flawlessly. Make it SKIP FOR emptyclipboard() and a function of that name logging each call and returning EMPTY(_CLIPBOARD) and you'll see how often this is called.
You can also SET SKIP OF, but then need to intercept any change of _clipboard. You'll need BINDEVENT to Windows messages about the clipboard to get that fancy.
It's quite useless to do that even better than Word processing software. A user will see whether something is in the clipboard by pasting. I sometimes find myself surprised I couldn't copy something, more often when "copying" images or pressing PRT key not putting a screenshot into the image clipboard than when copy&pasting text.
2) DEFINE BAR only has the picture clause, unlike a command button also having a DisabledPicture you only have the greyed out effect as is also automatic to buttons with no specified DisabledPicture.
If you want that behaviour you'd need to create your own SKIP effect within the code triggered by a menu item only acting when the SKIP condition is false, but then you also don't have the greyed out menu item text. Besides while there is SET SKIP OF there isn't SET PICTURE or similar, so you'd need to RELEASE BAR and redefine it to reflect changes that way. You might even start creating your own popup forms for menus if you start going that detailed about features not offered natively or barely offered by stretching the capabilities in such ways. It might even be simpler to make use of web browser control and using any JS/CSS library for web menus to get where you want using something existing from that web development domain.
There is the VFPX OOP Menu and in the SFBar class the skip for condition, caption picture and so on are properties, but there is no cPictureFile_assign method, so changing this cPictureFile when the bar already is rendered doesn't change it, the oop menu still bases menu bars on native VFP menu bars.
Bye, Olaf.
Olaf Doschke Software Engineering