ďťż

Ładny brzuch

Ostatnio robiłem sobie odtwarzacz multimedialny (Ekspert 4/05) lecz mój DSTrackBar nie chce się przesuwać zgodnie z filmem(wogóle się nie przesuwa :)
Moge sobie nim jeździć w przód i w tył a film się nie przesuwa.
Pomocy



Pokaż kod? :> Daj więcej szczegółów! Zgadywać mamy, jak ty to robiłeś? Boże...

unit Unit1; interface uses  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,  Dialogs, Buttons, DSPack, ComCtrls, Menus, StdCtrls; type  TForm1 = class(TForm)    MainMenu1: TMainMenu;    Plik1: TMenuItem;    Otworz1: TMenuItem;    OpenDialog1: TOpenDialog;    DSTrackBar1: TDSTrackBar;    FilterGraph1: TFilterGraph;    SpeedButton1: TSpeedButton;    SpeedButton2: TSpeedButton;    SpeedButton3: TSpeedButton;    Label2: TLabel;    Label1: TLabel;    procedure Otworz1Click(Sender: TObject);    procedure DSTrackBar1Timer(sender: TObject; CurrentPos,      StopPos: Cardinal);    procedure FormClose(Sender: TObject; var Action: TCloseAction);    procedure SpeedButton1Click(Sender: TObject);    procedure SpeedButton2Click(Sender: TObject);    procedure SpeedButton3Click(Sender: TObject);  private    { Private declarations }  public    { Public declarations }  end; var  Form1: TForm1; implementation uses Unit2; {$R *.dfm} procedure TForm1.Otworz1Click(Sender: TObject); begin  if(Form2=nil) then Form2:=TForm2.Create(Form1); if OpenDialog1.Execute then begin   FilterGraph1.ClearGraph;   FilterGraph1.RenderFile(OpenDialog1.FileName);   if (OpenDialog1.FilterIndex = 1) then      Form2.Show      else      Form2.Hide;      Label2.Caption := OpenDialog1.FileName;      FilterGraph1.Play;   end; end; procedure TForm1.DSTrackBar1Timer(sender: TObject; CurrentPos,  StopPos: Cardinal); begin   Label1.Caption := format('%s / %s',         [TimeToStr(CurrentPos / (24*3600*1000)),          TimeToStr(StopPos / (24*3600*1000))]); end; procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); begin FilterGraph1.ClearGraph; FilterGraph1.Destroy; end; procedure TForm1.SpeedButton1Click(Sender: TObject); begin FilterGraph1.Play; end; procedure TForm1.SpeedButton2Click(Sender: TObject); begin FilterGraph1.Stop; end; procedure TForm1.SpeedButton3Click(Sender: TObject); begin FilterGraph1.Pause; end; end.

a skojarzyłeś TDSTrackBar z TFilterGraph?
DSTrackBar1.FilterGraph := FilterGraph1; lub zrób to od palca.



No skojarzyłem, ale nie dziala.
Próbowałem wstawić też to recznie,ale albo to nie działa albo ja gdzies to źle umieściłem.

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • zsf.htw.pl
  •