RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMenu.DispatchCommand Method

Calls the Click method of the menu item with the specified value as its Command property.

Pascal
function DispatchCommand(ACommand: Word): Boolean;
C++
__fastcall Boolean DispatchCommand(Word ACommand);

Call DispatchCommand to simulate a click on the menu item associated with a command ID. If DispatchCommand locates a menu item that matches the command ID, it calls the Click method for that menu item and returns true. If there is no such item, DispatchCommand returns false. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!