Eigentlich nichts besonderes...
Delphi-Quellcode:
procedure TMainForm.VolumeOffImageClick(Sender: TObject);
begin
vol := TrackBar1.Position;
BASS_ChannelSetAttribute(chan, BASS_ATTRIB_VOL, 0);
VolumeOffImage.Visible := False;
VolumeOnImage.Visible := True;
TrackBar1.Position := 0;
end;
procedure TMainForm.VolumeOnImageClick(Sender: TObject);
begin
if (TrackBar1.Position = 0) and (vol = 0) then
begin
TrackBar1.Position := 50;
VolumeOffImage.Visible := True;
VolumeOnImage.Visible := False;
end else
begin
TrackBar1.Position := vol;
VolumeOffImage.Visible := True;
VolumeOnImage.Visible := False;
end;
end;