![]() |
Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming! |
⤷ Play wav sound from a resource file
The problem is not so difficult. You should include {$R MySoundRes.RES} line to the implementation section. And for playing wav sound you must use the PlaySound procedure.There is a 'SOUND' section which contents a musical file in the resource file.
{$R MySoundRes.RES}
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
PlaySound('SOUND', 0, SND_RESOURCE);
end;
-
More for developers