![]() |
Re: Rhytmus
Hallo Herr Orhan.
Und wie hast du es jetzt gelöst? |
Re: Rhytmus
Hallo
So habe ich es ausprobiert, es funktioniert wunderbar. Danke! var mmsystem; procedure Warten(ms: Cardinal); var zeit: Cardinal; begin zeit:= GetTickCount; while ((GetTickCount-zeit)< ms) do Application.ProcessMessages; end; procedure TForm1.Timer1Timer(Sender: TObject); const x:integer=0; begin x:=x+1; panel1.caption:=inttostr(x); If panel1.caption= '1' then PlaySound('\1.wav',0,snd_Async); If panel1.caption='2' then PlaySound('\2.wav',0,snd_Async); If panel1.caption='3' then PlaySound('\3.wav',0,snd_Async); If panel1.caption='4' then PlaySound('\4.wav',0,snd_Async); If panel1.caption='5' then PlaySound('\5.wav',0,snd_Async); Warten(1500);//1500 Millisekunden=1,5 Sekunden lang warten end; |
Re: Rhytmus
kleiner Tip für die Lesbarkeit:
Delphi-Quellcode:
x:=x+1;
panel1.caption:=inttostr(x); If panel1.caption= '1' then PlaySound('\1.wav',0,snd_Async); If panel1.caption='2' then PlaySound('\2.wav',0,snd_Async); If panel1.caption='3' then PlaySound('\3.wav',0,snd_Async); If panel1.caption='4' then PlaySound('\4.wav',0,snd_Async); If panel1.caption='5' then PlaySound('\5.wav',0,snd_Async); --> // str: string; inc(x); pane11.caption:= inttostr(x); str:='\'+inttostr(x)+'.wav' Playsound(str,0,snd_Async); |
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:01 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz