Delphi, Alterar volume com TrackBar


http://informaticode.blogspot.com.br/search/label/Delphi
Uses MMSystem

procedure TForm1.TrackBar1Change(Sender: TObject);
var
s:string;
begin
s:='0x'+ inttostr(trackbar1.Position)+ inttostr(trackbar1.Position);
MMSystem.waveOutSetVolume(0, StrToInt(s));

end;

procedure TForm1.FormCreate(Sender: TObject);
begin
trackbar1.Max:=96;
trackbar1.Min:=6;
trackbar1.Position:=50;
end;

end