It would be great if you can show me an exemple with you
explainations.
I need to know which code should I use and which library (if there's
one).
Thank you,
Patrick
psta...@mixmedia.qc.ca
To make a AVI fit in a panel use this code:
begin
with MediaPlayer1 do begin
DeviceType := dtAutoSelect;
visible := false;
FileName := InputBox('AVI', 'Enter AVI file name',
'c:\windows\borland.avi');
display := panel1;
open;
DisplayRect := rect(0, 0, panel1.width, panel1.height); {This is it!}
rewind;
play;
end;
end;
{ This code came from Lloyd's help file! }
Now to doe the reverse and make the panel the same size as the default avi
size, load the avi file first, then size the panle based on the Trect
parameters, like so:
A: Note: the DisplayRect property is modified when the avi file is
opened. Therefore, setting or getting the DisplayRect must be done after
the file is opened.
var
t: trect;
begin
with MediaPlayer1 do begin
DeviceType := dtAutoSelect;
visible := false;
FileName := InputBox('AVI', 'Enter AVI file name',
'c:\windows\borland.avi');
display := panel1;
open;
t := DisplayRect;
caption := IntToStr(t.left) + ' : ' + IntToStr(t.top) + ' : ' +
IntToStr(t.right) + ' : ' + IntToStr(t.bottom); {This is it!}
rewind;
play;
end;
end;
{ This code came from Lloyd's help file! }
good luck
fred011
Jungle <psta...@mixmedia.qc.ca> wrote in article
<5bj57n$flp$1...@wagner.spc.videotron.ca>...