AVI in fullscreen with a TMediaPlayer  

Send By: Q3 Team
Web : http://www.q3.nu
Email: dlib@q3.nu
Date: 04/09/99

Tip accessed 485 times

 




We will use the property Display and DisplayRect of the MediaPlayer:

  • Make a form (Form1) and put a TMediaPlayer (MediaPlayer1) in her.
  • Put the property BorderStyle from Form1 to bsNone
  • Put the property WindowState of Form1 to wsMaximized
  • In te property Display MediaPlayer1 put Form1
  • Assign a AVI file to MediaPlayer1
  • Put the property AutoOpen from Mediaplayer to TRUE
  • Put this code in the event OnCreate Form1:


     procedure TForm1.FormCreate(Sender: TObject);
     var
        Rectangulo:TRect;
     begin
       with Rectangulo do
       begin
         Left:=0;
         Top:=0;
         Right:=Screen.Width;
         Bottom:=Screen.Height;
       end;
       MediaPlayer1.DisplayRect:=Rectangulo;
       MediaPlayer1.Play;
     end;