18-05-2011, 01:24 PM
اخي الكريم الاجابة تمت على اساس طرحك للمشكل الكود الذي كتبته نجح معي وتتم القراءة من سورة الى اخرى بعد انتهاء الاولى هذا يتم على حساب الطول الزمني للسورة .
انظرالى :
SouraPos و SouraLen .
هل هذا ماتبحث عنه
انظرالى :
SouraPos و SouraLen .
هل هذا ماتبحث عنه
PHP كود :
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
Case ComboBox1.ItemIndex of
1:WindowsMediaPlayer1.URL:='http://server10.mp3quran.net/jleel/001.mp3';
2:WindowsMediaPlayer1.URL:='http://server10.mp3quran.net/jleel/008.mp3';
3:WindowsMediaPlayer1.URL:='http://server10.mp3quran.net/jleel/009.mp3';
end;
timer1.enabled:=true;
{هذا كله يمكنك استبداله بالكود الموجود في الاعلى
If ComboBox1.text='EL_FATHA' then
WindowsMediaPlayer1.URL:='http://server10.mp3quran.net/jleel/001.mp3';
////////////////////////////////
If ComboBox1.text='EL_ANFALL' then
WindowsMediaPlayer1.URL:='http://server10.mp3quran.net/jleel/008.mp3';
////////////////////////////////
If ComboBox1.text='EL_TAOUBAA' then
WindowsMediaPlayer1.URL:='http://server10.mp3quran.net/jleel/009.mp3';
}
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var
SouraPos,
SouraLen:Integer;
begin
SouraPos :=Trunc( WindowsMediaPlayer1.controls.currentPosition);
SouraLen :=Trunc( WindowsMediaPlayer1.currentMedia.duration);
if (SouraPos=SouraLen) and (SouraPos>0) then begin
ComboBox1.ItemIndex :=ComboBox1.ItemIndex+1;
ComboBox1Change(self);
end;
end;

