media player in delphi

I want to play some .wmv files in my program using the mediaplayer component.
now as you know mediaplayer displays the video in the component linked in the DISPLAY property.
in my program i have linked it to a panel.
the problem is that the video's original  dimension are 800 x 600 while my panel is half that size.
this causes the video to be displayed only half. is there any way to resize\zoom the video so that it fits on the panel ?
data-novaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jexd99Commented:
Some videos dont play in that, I have been looking at the activex control for WMP but that has really limited information avaiable.  I'm having a tough time finding info on that as I think thats actually the better component.  I wonder if D2006 has improved their media player so that all files will play on it (on D5 there are alot of videos that have problems).
0
ZhaawZSoftware DeveloperCommented:
I believe you have to set MediaPlayer1.DisplayRect
MediaPlayer1.DisplayRect := Panel1.ClientRect;
0
ZhaawZSoftware DeveloperCommented:
There's a problem with DisplayRect - if you make it 1000x100, it will show 1000x100 :) even if real video size is 800x600 (so it should show 133x100 instead of 1000x100), so some calculations will be needed to stretch it proportionally. Say if you need some help with this
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

data-novaAuthor Commented:

 Hi Zhaawz ,

  thanks a lot :)
0
ZhaawZSoftware DeveloperCommented:
Glad to help ;]
0
data-novaAuthor Commented:
but it cuts the movie , is there anyway to zoom it ?
0
ZhaawZSoftware DeveloperCommented:
Does it cut? It should stretch (zoom) a movie to specified rectangle (at least it did so when I tried it).
0
geobulCommented:
Hi,

Zhaawz is right. Just place that line after Open and before play:

  MediaPlayer1.Open;
  MediaPlayer1.DisplayRect := Panel1.ClientRect;
  MediaPlayer1.Play;

Regards, Geo
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
data-novaAuthor Commented:

 oh now it works :)  Geo was right the code has to be between Open and PLay.

 thanks a lot Zhaawz and Geo
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.