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

TEmulatedTaskDialog.KeyDown

Handles Alt+F4 and Esc key down events for the emulated task dialog.

Declaration

Source position: lcltaskdialog.pas line 205

public procedure TEmulatedTaskDialog.KeyDown(

  var Key: Word;

  Shift: TShiftState

); override;

Arguments

Key

  

Virtual key code for the key down event.

Shift

  

Shift, Ctrl, or Alt modifier for the key event.

Description

KeyDown is an overridden method in TEmulatedTaskDialog. It handles key down events which may close the emulated task dialog form.

If the form has a system menu icon in BorderIcons, the Escape key causes the form to be closed by calling the Close method.

If a system menu is not used in BorderIcons, use of Alt+F4 to close the dialog form is prevented. The value in Key is set to 0 to discard the key event.

KeyDown calls the inherited method prior to exit using the values in Key and Shift as arguments. This allows the ancestor to signal OnKeyDown event handler(s) used in the application.


Version 4.0 Generated 2025-05-03 Home