Autor Beitrag
Gruenschnabel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 41

Windows 7, 10
Delphi6, Delphi7SEportable, Delphi 10 Berlin Starter
BeitragVerfasst: Do 22.10.09 16:33 
Hallo!

Ich hab eine relativ komplexe IF-Verkettung vor mir und will bei einer Bedingung mehrere sounds aus eine resource nacheinander abspielen.
ausblenden Delphi-Quelltext
1:
2:
3:
If RB_brand_klein.Checked
Then PlaySound(PChar(2),HInstance, snd_ASync or snd_Memory or snd_Resource)
Else IF RB_brand_gross.Checked [usw. ...]

das ist die einfache variante, in der nur ein file abgespielt wird. funktioniert wie es soll. nun soll aber nach dem sound des index 2 ein weiterer folgen, ein beliebiger, ebenfalls aus der resource. Aber egal wie ich es versuche (Komma, Klammer, And,...) es funktioniert nicht. Kann mir jemand nen Gedankenanstoss geben?

MfG,

gruenschnabel

Moderiert von user profile iconNarses: Quote- durch Delphi-Tags ersetzt
Gruenschnabel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 41

Windows 7, 10
Delphi6, Delphi7SEportable, Delphi 10 Berlin Starter
BeitragVerfasst: Sa 24.10.09 19:00 
Habs mit Label/ GOTO gelöst. Zwar nicht elegant, aber führt zum Ziel.

Danke
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Sa 24.10.09 19:43 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
If RB_brand_klein.Checked
Then
begin
PlaySound(PChar(2),HInstance, snd_ASync or snd_Memory or snd_Resource);
PlaySound(PChar(2),HInstance, snd_ASync or snd_Memory or snd_Resource);
PlaySound(PChar(2),HInstance, snd_ASync or snd_Memory or snd_Resource);
end
Else IF RB_brand_gross.Checked [usw. ...]

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Gruenschnabel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 41

Windows 7, 10
Delphi6, Delphi7SEportable, Delphi 10 Berlin Starter
BeitragVerfasst: Do 05.11.09 22:49 
Eigentlich bin ich der Meinung das so versucht zu haben. Allerdings hätte es dann ja klappen müssen :-D
Wer weiß, was ich da falsch gemacht habe. THX!