Das verhindert zwar nicht den Beep, aber man bekommt es wenigstens mit:
Delphi-Quellcode:
type
TEdit =
class(
Vcl.StdCtrls.TEdit)
private
procedure CNCommand(
var Message: TWMCommand);
message CN_COMMAND;
end;
...
procedure TEdit.CNCommand(
var Message: TWMCommand);
begin
if (
Message.NotifyCode = EN_MAXTEXT)
then
ShowMessage('
Nee, nee, nee!')
else
inherited;
end;