else kw = (float) mw / fw;
if (fh < mh)
kh=1; //kadr balandlik bo’yicha ekran o’lchamidan
//kichik
else kh = (float) mh / fh;
// mashtablashtirish proporsional bo’lishi shart
if (kw < kh)
k = kw;
else k = kh;
// bu yerda mashtab aniqlanadi
sw = fw * k; // ekran kengligi
sh = fh * k; // ekran balandligi
left = (Form1->ClientWidth - sw) / 2;
top = (Panel1->Top - sh) / 2;
MediaPlayer1->FileName = OpenDialog1->FileName;
MediaPlayer1->Open();
MediaPlayer1->DisplayRect = Rect(left,top,sw,sh);
/* agar tanlangan klip kadri o’lchami oldingi klip kadr o’lchamidan kichik bo’lsa, unda ekranni (forma soxasi) tozalash kerak */
Form1->Canvas->FillRect(Rect(0,0,ClientWidth,
Panel1->Top));
SpeedButton2->Enabled = true; // endi Playt tugmasi
// murojaatli
// tiklash vaqti xaqida ma’lumotlarni chiqarish
MediaPlayer1->TimeFormat = tfMilliseconds;
Do'stlaringiz bilan baham: |