Get the App
SLTechnology News&Howtos  ›  Development  › 

How to display an AVI file on the full screen

Shulou Source: shulou.com Published: 2022-06-03 09:48:17 09月30日 Update

This article mainly introduces how to display an AVI file on the full screen, which has a certain reference value, and interested friends can refer to it. I hope you can learn a lot after reading this article.

(1) create a project file

(2) Select File | New Form to create a form and set its Name: = Form2

(3) set Form2.BorderStyle: = bsNone

(4) place a MedialPlayer component on the Form2

(5) place a Panel component on Form2 and set its Name: = Panel1

(6) set Panel1.Align: = alClient

(7) add the following code to the Button1 of Form1:

Procedure TForm1.Button1Click (Sender: TObject); beginwith Form2 do begin Show; WindowState: = wsMaximized;MediaPlayer1.Notify: = false;MediaPlayer1.Display: = Panel1;MediaPlayer1.FileName: ='C:\ Temp\ cool.avi'; MediaPlayer1.Open;MediaPlayer1.DisplayRect: = Form2.ClientRect;MediaPlayer1.Play;end;end

(8) add the following code to the OnNotify event of Form2's MediaPlayer1

Procedure TForm2.MediaPlayer1Notify (Sender: TObject); beginif MediaPlayer1.NotifyValue = nvSuccessfulthen Form2.Close; end; Thank you for reading this article carefully. I hope the article "how to display an AVI document on full screen" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Articles documents screens code artifacts events values interests at the same time engineering more friends knowledge forms editing industry information information channels channels references Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux vpn Apple Huawei Shulou Information