Windows Media Player in Delphi 7 - Programmers Heaven

Howdy, Stranger!

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


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

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.



  • 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.