Главная страница | назад





Article #16914: Show a AVI clip in full screen zoom mode

 Question and Answer Database
FAQ1914D.txt Show a AVI clip in full screen zoom mode
Category :Miscellaneous
Platform :All
Product :All 32 bit
Question:
How can I show a AVI clip in full screen zoom mode?
Answer:
The following example demonstrates playing a AVI file
in full screen mode by displaying the AVI on a second
form that has the form border style set to bsNone and
has no border icons. Note that the second form has a
panel with it's alignment set to alClient, and a
MediaPlayer component that has a Notify event. We will
show the second form maximized, and when the AVI file
has played, the Notify event will close the form.
Example:
{Code for Form 1}
uses Unit2;
procedure TForm1.Button1Click(Sender: TObject);
begin
Form2.Show;
Form2.WindowState := wsMaximized;
Form2.MediaPlayer1.Notify := false;
Form2.MediaPlayer1.Display := Form2.Panel1;
Form2.MediaPlayer1.FileName := 'C:\TheWall\DELCAR2.AVI';
Form2.MediaPlayer1.Open;
Form2.MediaPlayer1.DisplayRect := Form2.ClientRect;
Form2.MediaPlayer1.Play;
end;
{Code for Form 2}
procedure TForm2.MediaPlayer1Notify(Sender: TObject);
begin
if MediaPlayer1.NotifyValue = nvSuccessful then
Form2.Close;
end;
7/16/98 4:31:28 PM

Last Modified: 01-SEP-99