Autor Beitrag
Jojojoxx
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 386



BeitragVerfasst: So 12.11.06 13:01 
Hallo!

Ich habe eine Prozedur geschrieben, die einen Ton abspielt.
Ab Aufruf der Funktion bis zum Ende des Abpsielens wird der nachfolgende Code nicht ausgeführt, sondern erst, wenn die Prozedur zu ende ausgeführt wurde. Lässt sich dies umgehen, dass der Prorgammablauf weitergeht?
Danke euch!
mfg

Jojo
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: So 12.11.06 13:06 
Vieleicht hilfts Dir wenn Du Application.ProcessMessages; mit einbaust.
Blackheart666

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
Jojojoxx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 386



BeitragVerfasst: So 12.11.06 13:12 
user profile iconBlackheart666 hat folgendes geschrieben:
Vieleicht hilfts Dir wenn Du Application.ProcessMessages; mit einbaust.


Hi!
Leider bringt das nichts!
mfg

Jojo
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: So 12.11.06 13:12 
Oder mit einem zusätzlichen Thread für deinen Ton:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure Ton;
begin
 windows.Beep(100,500);
end;

//Aufruf:
procedure TonStarten;
var Id: cardinal;
begin
 CreateThread(nil,0,@Ton,nil,0,ID);
end;

grüße marc
Jojojoxx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 386



BeitragVerfasst: So 12.11.06 13:19 
Hi!

Ja danke, das klappt!!
Lässt sich dieser Thread auch irgendwie wieder beenden/killen?
mfg

Jojo
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: So 12.11.06 13:27 
Ja, mit
ausblenden Delphi-Quelltext
1:
TerminateThread(ID,0);					

Aber user profile iconLuckie hat hier ein wunderbares Tutorial über Threads! ;)

grüße marc

Moderiert von user profile iconChristian S.: Nutzername korrigiert
Jojojoxx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 386



BeitragVerfasst: So 12.11.06 13:44 
Okay, danke!
Hat mir weitergeholfen.
mfg

Jojo