unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, Menus, MPlayer,MMSystem, StdCtrls, ExtCtrls, Buttons;
type
TForm1 = class(TForm)
SpeedButton1: TSpeedButton;
ScrollBar1: TScrollBar;
MediaPlayer1: TMediaPlayer;
OpenDialog1: TOpenDialog;
procedure SpeedButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
OpenDialog1.Execute; // otwiera okno wyboru
if OpenDialog1.FileName <> '' then
Begin
MediaPlayer1.DeviceType := dtAutoSelect; // auto. odtwarzanie
MediaPlayer1.FileName := OpenDialog1.FileName;
MediaPlayer1.Open;
ScrollBar1.Max := MediaPlayer1.Length;
ScrollBar1.Position := MediaPlayer1.Position;
MediaPlayer1.Play;
end;
end;
end.
Jest to program ktory odtwarza dzwieki.
Jak dodac do scrollbara regulacje głosnosci ?(przesuniecie w lewo całkiem wyciszony w prawo gra na max'a)
Przeszukałem całe FAQ i gotowce lecz nic ciekawego nie znalazłem.