I need to make a Timage item hide or disappear after a certain key is being pressed, while the program is still running.

I know that onKeyPress method can't really make changes to the Graphic items such like Timage, so is there any other alternative ways which I could use for my situation?

1

There are 1 best solutions below

0
Delphi Coder On

Set KeyPreview of the form to true and write an OnKeyPress|Down|Up event for the form, where you hide that TImage.