Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Windows Media Player in Delphi 7
I was wondering if anyone could help. I am writing an application that will display a video file when you click a button. To do this I am using the Windows Media Player ActiveX component. I have added it in through Component | Import ActiveX Control | Windows Media Player (v1.0). Below is a section of my code.
wmpMediaPlayer := TWindowsMediaPlayer.Create(Self);
wmpMediaPlayer.Parent := Self;
wmpMediaPlayer.Visible := True;
wmpMediaPlayer.Settings.AutoStart := False;
wmpMediaPlayer.URL := 'anymoviefile.mpg';
How ever when I call the fullscreen function
wmpMediaPlayer.FullScreen := True
and try and set it to True I get the error "Catastrophic Failure" and can not get the video to show full screen. I have tried setting the width and height of the component to screen width/height but as soon as the video is played it resizes Media Player to the size of the clip its playing.
Am I doing something wrong or is this a "feature" of the ActiveX component and Delphi7.