Autor Beitrag
stigge
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Do 22.03.07 22:28 
Ich verstehe einfach nicht, was hieran falsch ist:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.TrackBar2Change(Sender: TObject);
begin
if GetAsyncKeyState(VK_LBUTTON) = 0 then begin
mediaplayer2.pause;
mediaplayer2.position := trackbar2.position;
mediaplayer2.Resume;
 end;
end;

Ich habe mal per showmessage überprüft, was jetzt als Position angegeben wird, und es ist ein möglicher Wert. Achso, der Fehler ist, das der Player nicht beginnt abzuspielen^^
Saubäär
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 376



BeitragVerfasst: Do 22.03.07 22:44 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.TrackBar2Change(Sender: TObject);
begin
if GetAsyncKeyState(VK_LBUTTON) = 0 then begin
mediaplayer2.position := trackbar2.position;
mediaplayer2.Play;
 end;
end;


so gehts doch.
stigge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Do 22.03.07 22:50 
user profile iconSaubäär hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.TrackBar2Change(Sender: TObject);
begin
if GetAsyncKeyState(VK_LBUTTON) = 0 then begin
mediaplayer2.position := trackbar2.position;
mediaplayer2.Play;
 end;
end;


so gehts doch.

Eben nicht! Dann fängt er wieder von vorne an!
Saubäär
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 376



BeitragVerfasst: Do 22.03.07 22:51 
user profile iconstigge hat folgendes geschrieben:

Eben nicht! Dann fängt er wieder von vorne an!


Tatsache? Bei mir funktionierts :nixweiss:
stigge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Do 22.03.07 22:53 
Könnte es daran liegen, das bei mir schon eine Datei wiedergegeben wird?
Saubäär
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 376



BeitragVerfasst: Do 22.03.07 22:54 
Aaachso, du hast wahrscheinlich das hier vergessen, nicht wahr?
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.FormActivate(Sender: TObject);
begin
 TrackBar2.Max := MediaPlayer2.Length;
end;


user profile iconstigge hat folgendes geschrieben:
Könnte es daran liegen, das bei mir schon eine Datei wiedergegeben wird?

Ich denke nicht.
stigge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Do 22.03.07 22:59 
user profile iconSaubäär hat folgendes geschrieben:
Aaachso, du hast wahrscheinlich das hier vergessen, nicht wahr?
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.FormActivate(Sender: TObject);
begin
 TrackBar2.Max := MediaPlayer2.Length;
end;


user profile iconstigge hat folgendes geschrieben:
Könnte es daran liegen, das bei mir schon eine Datei wiedergegeben wird?

Ich denke nicht.

Nee, hab ich nicht vergessen. Ich machs sogar über die mß3utils unit von gausi, also stimmt auch duie läge ziemlich sicher. Eventuell irgendwelche falschen einstellungen beim mediaplayer? sag mal was du bei autorewind usw hast.
stigge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 426

WinXP
Delphi 2007
BeitragVerfasst: Do 22.03.07 23:05 
Naja, ich schlaf jetzt erstmal drüber. Falls jemand noch eine Idee hat, nur her damit^^ Ich schau sie mir morgen Mittag an.
Saubäär
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 376



BeitragVerfasst: Do 22.03.07 23:05 
Tjo, merkwürdig. Also:
AutoRewind=True, AutoOpen=True, AutoEnabled=True

das andere ist wohl eher uninteressant. Viel Glück! :)