RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomForm.IsShortCut Method

Processes shortcut keys when the form has focus.

Pascal
function IsShortCut(var Message: TWMKey): Boolean; dynamic;
C++
__fastcall Boolean IsShortCut(TWMKey Message);

IsShortCut is called automatically when the user presses a key while the form has focus. It allows the form to dispatch shortcut keys and bypass the standard keystroke processing (OnKeyDown, OnKeyPress, and OnKeyUp events). 

The Message parameter encapsulates the Windows message describing the keypress. If a shortcut for the key exists, IsShortCut executes the appropriate command and returns true. Otherwise IsShortCut returns false. 

IsShortCut generates an OnShortCut event to allow the developer to insert shortcuts for the form. If the keystroke is not handled in an OnShortCut event handler, IsShortCut checks for any shortcuts associated with the form's menus and actions. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!