Autor Beitrag
Alex_ITA01
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 56

Win XP
D7 Prof
BeitragVerfasst: Mi 08.10.03 12:15 
hallo erstmal,

ich habe mir schon die ganzen Beiträge angeguckt aber irgendwie haut mein Code net hin.Kann mir einer sagen was falsch ist?
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
procedure TForm1.TrackBar2Change(Sender: TObject);
begin
  Form1.MediaPlayer1.Pause;
  MediaPlayer1.Position := TrackBar1.Position;
  MediaPLayer1.Play;
end;

procedure TForm1.Timer3ZeitTimer(Sender: TObject);
begin
  if Form1.MediaPlayer1.Mode = mpPlaying then
  begin
    Form1.TrackBar2.Max := Form1.MediaPlayer1.Length;
    Form1.Trackbar2.Position := Form1.MediaPlayer1.Position;
  end;
end;


danke alex

Moderiert von user profile iconTino: Delphi-Tags hinzugefügt.
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Do 09.10.03 12:18 
Ich bin dir auf den Fersen, Alex ;-)

Hab deinen code mal ausprobiert, und es geht. Ich habe aber auch nur eine Trackbar eingebaut, und wahrscheinlich liegt da dein Fehler:
in Trackbar----2----.change, wieso setzt du die Mediaplayer1.position auf trackbar----1----.position?

btw: So richtig funzt das nicht, weil: immer wenn der timer aufgerufen wird, ändert sich die position der Trackbar, dadurch wird OnChange der Trackbar aufgerufen, und die Ausgabe macht kurz pause. hört sich extrem bescheiden an...das sollte man etwas anders machen...

_________________
We are, we were and will not be.
Alex_ITA01 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 56

Win XP
D7 Prof
BeitragVerfasst: Do 09.10.03 12:37 
Titel: danke
gausi du verfolgst mich echt mittlerweile aber solange du mir hilfst ist das ok, danke den fehler hab ich gar net gesehen
ich versuche mal was anderes noch
Philer
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 79

Win XP Home
D7 Enterprise
BeitragVerfasst: Fr 07.11.03 23:04 
was nur ... ?

_________________
- Delphi n00b -
-Philer teh thriller-
Philer
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 79

Win XP Home
D7 Enterprise
BeitragVerfasst: Fr 07.11.03 23:21 
ah
...
Trackbar1.OnChange := nil;
TrackBar1.Position := MediaPlayer1.Position;
TrackBar1.OnChange := TrackBar1Change;

_________________
- Delphi n00b -
-Philer teh thriller-