Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's 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 its 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

Hi,
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.

uses
WMPLib_TLB

var
wmpMediaPlayer: TWindowsMediaPlayer

wmpMediaPlayer := TWindowsMediaPlayer.Create(Self);
wmpMediaPlayer.Parent := Self;
wmpMediaPlayer.Visible := True;
wmpMediaPlayer.Settings.AutoStart := False;
wmpMediaPlayer.URL := 'anymoviefile.mpg';
wmpMediaPlayer.Controls.play;


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.

TIA
Gary

Comments

  • HellFire63HellFire63 Posts: 1Member
    Have You Tried Setting The Stretch Property To True.
    If It Works With Images It Might Work For Videos.
    Are You Using The Windows Media Player For Any Specific Reasonm, Because There Is An Inbuilt Media Player Component In the System Tab.
Sign In or Register to comment.