Autor Beitrag
Timbo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 166



BeitragVerfasst: So 06.06.04 14:17 
moin moin,

habe ein edit feld, in dem mit der entertaste eine suche gestartet wird.
funzt auch alles, OnKeyDown und dann vk_return abgefragt.

nun spielt XP jedesmal eine sound ab, wenn ich die entertaste drücke.
das nervt, möchte das ohne sound.

könnte ja in windows das abstellen, aber ich möchte die software auch auf anderen rechnern betreiben, und habe keine lust da vorher in windows rumfummeln zu müssen.

wie kann ich das noch abschalten?

vielen dank.
StefanH
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: So 06.06.04 14:37 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.Edit1KeyPress(...)
begin
 if Key=#13 then
   begin
      key:= #0;
      //Code
   end;
end;

_________________
"Als es noch keine Computer gab, war das Programmieren noch relativ einfach."(Edsger W. Dijkstra)
"Ich bin nicht von Sinnen, sondern ich rede wahre und vernünftige Worte." (Paulus)
Timbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 166



BeitragVerfasst: So 06.06.04 14:46 
danke schon mal.
funzt aber nicht.

Key ist vom typ word.
und mit Key:= 0;
geht es auch nicht.

obwohl es doch ein variablen parameter ist.
müsste man doch eigentlich auch schreibend drauf zugreifen können.

ausblenden Delphi-Quelltext
1:
2:
procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);


noch jemand eine idee?
StefanH
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: So 06.06.04 14:50 
StefanH hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.Edit1KeyPress(...)
begin
 if Key=#13 then
   begin
      key:= #0;
      //Code
   end;
end;


^^ ich dachte, man sieht, dass es onKeyPress ist :)

_________________
"Als es noch keine Computer gab, war das Programmieren noch relativ einfach."(Edsger W. Dijkstra)
"Ich bin nicht von Sinnen, sondern ich rede wahre und vernünftige Worte." (Paulus)
Timbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 166



BeitragVerfasst: So 06.06.04 14:51 
mmmhh

habe nun die funktion keypress genommen und es so gemacht wie du schreibst.
dann geht es.

????
Timbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 166



BeitragVerfasst: So 06.06.04 14:52 
supi, danke dann schreib ich das mal um nehme jetzt halt keypress.

vielen dank StefanH.