Yuki Asked:2023-09-26 18:59:45 +0000 UTC2023-09-26 18:59:45 +0000 UTC 2023-09-26 18:59:45 +0000 UTC 禁止在文本中仅输入俄语字符编辑 772 由于某种原因,此代码不会阻止俄语(西里尔字母)字符的输入 procedure Tf_main.KeyPress_ENG(Sender: TObject; var Key: Char); begin if (Key in ['А'..'я']) then Key := #0; end; delphi 1 个回答 Voted Best Answer Acinit 2023-09-26T19:41:01Z2023-09-26T19:41:01Z 你可以试试这个: begin if (Key >= 'А') and (Key <= 'я') then Key := #0; end;
你可以试试这个: