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;