次の方法で共有


PRMBAR( ) Function

Returns the text of a menu item.

PRMBAR(cMenuName, nMenuItemNumber)

Parameters

  • cMenuName
    Specifies the menu name.

  • nMenuItemNumber
    Specifies the number of the menu item whose text PRMBAR( ) returns. For example, if nMenuItemNumber is 1, the text of the first menu item is returned; if nMenuItemNumber is 2, the text of the second menu item is returned, and so on. The expression must be at least 1 and no greater than the number of menu items in the menu.

Return Value

Character

Remarks

Menus are created with DEFINE POPUP, which creates the menu, and DEFINE BAR, which creates the menu items in the menu. PRMBAR( ) also works with a Visual FoxPro system menu. PRMBAR( ) returns the text that appears on the menu item. The menu doesn't have to be active.

If a menu item was created using the backslash and less-than characters (\<) to create an access key, or a backslash (\) to disable the menu item, PRMBAR( ) returns only the menu item text; it doesn't include these special characters. PRMBAR( ) returns an empty string when a menu item is a separator created with the backslash and dash (\-) characters.

See Also

Reference

CNTBAR( ) Function

GETBAR( ) Function

DEFINE BAR Command

DEFINE POPUP Command

MRKBAR( ) Function

PRMPAD( ) Function

Other Resources

Functions