Mega Code Archive

 
Categories / Delphi / VCL
 

Displaying the first frame of an avi file

Question: How can I display the first frame of an AVI File? Answer: The following demonstrates a hard core technique to get the MediaPlayer to reliably show the first frame of an AVI file. Example: procedure TForm1.Button1Click(Sender: TObject); begin Application.ProcessMessages; MediaPlayer1.Open; Application.ProcessMessages; MediaPlayer1.Step; Application.ProcessMessages; MediaPlayer1.Previous; end;