OnShortCut (Delphi)

From RAD Studio Code Examples
Jump to: navigation, search

Description

This example requires a TApplicationEvents and a TListBox on the form. Select the TApplicationEvents, double-click the OnShortCut event and add the following code to the handler. Trigger this event by pressing the CTRL key or any function key.

Code

procedure TMainForm.ApplicationEventsShortCut(var Msg: TWMKey;
  var Handled: Boolean);
begin
  lbOther.Items.Add('Event OnShortCut');
end;

Uses