ImageEn, unit imageenview

TIEVirtualKeyEvent


Declaration

TIEVirtualKeyEvent = procedure(Sender: TObject; VirtualKey: Dword; KeyData: Dword) of object;


Description

Event type for OnVirtualKey event.

Value Description
VirtualKey Specifies the virtual key code (the same as wParam of WM_KEYWODN, WM_KEYUP, WM_SYSKEYDOWN and WM_SYSKEYUP)
KeyData Specifies additional info about the key (the same as lParam of WM_KEYDOWN, WM_KEYUP, WM_SYSKEYDOWN and WM_SYSKEYUP)
KeyDown This is true on keydown, false on keyup


Example

procedure TfrmMain.ImageEnView1VirtualKey(Sender: TObject; VirtualKey, KeyData: DWORD; KeyDown: Boolean);
begin
  // Ctrl+Q clears the content
  if ( VirtualKey = Ord( 'Q' )) and ( KeyDataToShiftState(KeyData) = [ ssCtrl ]) then
    ImageEnView1.Clear();
end;