Examples Delphi

Title: Make sure the user will not enter characters in text box
// first of all we need to put a editbox and
then write the following code ONKEYPRESS event:
if (Key in [#8, 'a'..'z']) then
begin
Showmessage ('Characters are not allowed');
Key:= #0;
// and that's it