FAQ & Knowledge Base

Welcome to our Knowledge Base. Search or browse through the topics below to find answers to your questions.

Categories: ShellBrowser Delphi Components | Show all categories

Prevent actions that are triggered by key presses

Question / Problem

How can I prevent actions that are caused by key presses, e.g. a FullRefresh by F5?

Answer / Solution

Use the OnKeyDown event like this and overwrite the Key value:

procedure TForm1.MyistKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
   // suppress a FullRefresh by F5
   if (Key = VK_F5) then
      Key := 0;
end;