Microsoft KB Archive/105013
How to Determine If Text Is Highlighted
The information in this article applies to:
To determine if any text has been highlighted, you can use the SKPBAR() function to test the skip of the Copy bar of the Edit menu popup on the system menu. The SKPBAR() function returns .T. if the specified bar of a popup is disabled or .F. if the specified bar is enabled. For example:
1. Type the following in the Command window:
ON KEY LABEL f2 WAIT WINDOW ; IIF(SKPBAR('_msm_edit',_med_copy),"No Text is Selected", ; "Ready to Copy") NOWAIT
2. Press F2. The result should be a wait window with the message "No
Text is Selected."
3. Highlight some text in the Command window. Press F2. The result
should be a wait window with the message "Ready to Copy."
NOTE: If a custom menu is being used, the Copy bar (BAR# _med_copy) of the system menu must be available in order for this procedure to work correctly. Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a pop-up KBCategory: kbprg KBSubcategory: FxprgGeneral
Last Reviewed: June 27, 1995