Autor Beitrag
ibh_compucat
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 130

Win 2000, Win 8.1
D6, Ent. XE5 Ent.
BeitragVerfasst: Mo 01.03.04 12:08 
Hallo Freunde,

wenn man in einem Editfeld auf die Entertaste drückt, ertönt jedesmal ein nerviger Ton. Wie kann man den killen?

Gruß
ibh_compucat

Moderiert von user profile iconPeter Lustig: Topic verschoben
CenBells
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1547

Win 7
Delphi XE5 Pro
BeitragVerfasst: Mo 01.03.04 12:19 
hallo,

dies ist die falsche Kategorie, den beitrag hättest du unter VCL schreiben sollen. Aber nichts destotrotz hier die antwort.
Im OnKeyPressed event einfach
ausblenden Delphi-Quelltext
1:
Key := #0;					

schreiben.

Gruß
Ken

_________________
Eine Klasse beschreibt die Struktur und das Verhalten einer Menge gleichartiger Objekte.
Chatfix
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1583
Erhaltene Danke: 10

Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
BeitragVerfasst: Mo 01.03.04 12:22 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); 
begin 
  if key = #13 then // #13 = Return 
  begin 
    key := #0; 
    // Code... 
  end; 
end;

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
ibh_compucat Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 130

Win 2000, Win 8.1
D6, Ent. XE5 Ent.
BeitragVerfasst: Mo 01.03.04 12:27 
Danke Ihr Beiden, das wars!

Gruß
ibh_compucat
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 01.03.04 17:36 
CenBells hat folgendes geschrieben:
hallo,

dies ist die falsche Kategorie, den beitrag hättest du unter VCL schreiben sollen. Aber nichts destotrotz hier die antwort.
Im OnKeyPressed event einfach
ausblenden Delphi-Quelltext
1:
Key := #0;					

schreiben.

Gruß
Ken


das wäre falsch, denn dann kommt gar keine taste mehr im editfeld an !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 01.03.04 17:44 
Kann man solche Töne nicht direkt in Windows abschalten? Ist auch der bessere Weg, IMHO.
Und wehe das verschiebt jetzt einer auf Grund des Wortes "Töne" in die Multimedia-Sparte. :mrgreen:
CenBells
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1547

Win 7
Delphi XE5 Pro
BeitragVerfasst: Mo 01.03.04 19:00 
matze hat folgendes geschrieben:
CenBells hat folgendes geschrieben:
hallo,

dies ist die falsche Kategorie, den beitrag hättest du unter VCL schreiben sollen. Aber nichts destotrotz hier die antwort.
Im OnKeyPressed event einfach
ausblenden Delphi-Quelltext
1:
Key := #0;					

schreiben.

Gruß
Ken


das wäre falsch, denn dann kommt gar keine taste mehr im editfeld an !


Jaja, :wink: jetzt bloß nicht kleinlich werden hier. Man kann ja mal von ein bisserl eigeninitiative des Endanwenders ausgehen. er tippt nen Text ins edit, nichts erscheint, also macht er nen hack, so das doch was erscheint :twisted:

Gruß
Ken

_________________
Eine Klasse beschreibt die Struktur und das Verhalten einer Menge gleichartiger Objekte.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 01.03.04 20:37 
ja klar. aber ich dachte mir ich stell das mal klar, bevor ein "das geht nicht kommt" und ein bisserl background knwoledge ist auch net schlecht. die korrekte lösung stand ja drunter. das hab ich nur leider zu spät gesehen sorry.

_________________
In the beginning was the word.
And the word was content-type: text/plain.