AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Rhytmus

Ein Thema von Orhan · begonnen am 20. Feb 2005 · letzter Beitrag vom 24. Feb 2005
Antwort Antwort
Seite 2 von 2     12   
Benutzerbild von gmarts
gmarts

Registriert seit: 4. Apr 2004
Ort: Templin
290 Beiträge
 
Delphi 6 Enterprise
 
#11

Re: Rhytmus

  Alt 24. Feb 2005, 10:57
Hallo Herr Orhan.
Und wie hast du es jetzt gelöst?
procedure TForm1.Button1Click(Sender: TObject);
begin
button1.Click;
end;
  Mit Zitat antworten Zitat
Orhan

Registriert seit: 24. Dez 2004
Ort: Breslauerstr.9 Neu-Ulm
46 Beiträge
 
#12

Re: Rhytmus

  Alt 24. Feb 2005, 16:48
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;
  Mit Zitat antworten Zitat
Benutzerbild von Nikolas
Nikolas

Registriert seit: 28. Jul 2003
1.528 Beiträge
 
Delphi 2005 Personal
 
#13

Re: Rhytmus

  Alt 24. Feb 2005, 17:00
kleiner Tip für die Lesbarkeit:

Delphi-Quellcode:
x:=x+1;
panel1.caption:=inttostr(x);
If panel1.caption= '1then
PlaySound('\1.wav',0,snd_Async);
If panel1.caption='2then
PlaySound('\2.wav',0,snd_Async);
If panel1.caption='3then
PlaySound('\3.wav',0,snd_Async);
If panel1.caption='4then
PlaySound('\4.wav',0,snd_Async);
If panel1.caption='5then
PlaySound('\5.wav',0,snd_Async);

-->
// str: string;

inc(x);
pane11.caption:= inttostr(x);
str:='\'+inttostr(x)+'.wav'
Playsound(str,0,snd_Async);
Erwarte das Beste und bereite dich auf das Schlimmste vor.
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 2     12   


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:08 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz