I cannot figure out how to record the keystroke Delete . I found out that in the ASCII code table it is at 127th place, but if (Key = #127) then didn’t deliver me anywhere.
Then I checked the value of VK_DELETE , which was 47. I tried to use it, but it did not work.
KeyPreview := true set in my form.
I tried to add ShowMessage(IntToStr(Ord(Key))) to the Forms KeyPress event, but never received a pop-up message when I pressed the Delete key.
I need to handle Delete key presses in dynamically created edit fields. I want to control how much of a text user can be erased in this field, and I know how to handle deleting text using the Backspace key, now I need to figure out how to do this using the Delete key.
thanks
source share