Knowledgebase

status_loader

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;

Need further help getting started?

You did not find what you were looking for? Please contact us so we can provide an answer to your question.

Contact Form