This doesn't work in Lazarus. Am I missing maybe needing to add a unit?
procedure TForm3.Edit2Change(Sender: TObject);
begin
(this part here -->) if Key in ['0'..'9','A'..'Z','a'..'z'] then
begin
Exit;
end else
ShowMessage('You may use ONLY a combination of: a-z, A-Z, 0-9')
Key:=#0;
end;