[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Menus' (#lcl)

# TMenu.DispatchCommand

Executes the menu item with the specified numeric Command value.

## Declaration

Source position: menus.pp line 419

`public function TMenu.DispatchCommand(`
`ACommand: Word`
`):Boolean;`

## Arguments

`ACommand` |  | Numeric command value to locate in the menu items for the menu.

## Function result

True if a menu item with the specified command was found and executed.

## See also

TMenu.FindItem |  | Gets the menu item with the specified value in a given property.
TMenuItem.Command |  | Numeric command for the menu item as assigned in the widgetset class.
TMenuItem.Click |  | Performs actions needed when the menu item is clicked.