Delphi and Kylix

Moderators: pritaeas
Number of threads: 7260
Number of posts: 19067

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Windows Media Player in Delphi 7 Posted by grjones123 on 16 Nov 2005 at 8:18 AM
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

Report
Re: Windows Media Player in Delphi 7 Posted by HellFire63 on 14 Apr 2011 at 11:53 PM
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.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.