?
Solved

Screen size on media component

Posted on 1997-10-17
3
Medium Priority
?
196 Views
Last Modified: 2010-05-18
Is there a way to change the screen size when using the Tmedia component (I use D3)?  For example, when I click the "play" button, and an avi file plays, it always defaults to
a "default" size.  I would like to center it and adjust the size larger or smaller. Is there a way with this component?
                  Thanks
0
Comment
Question by:jexd99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 200 total points
ID: 1347865
Hi jexd99,
still working on your screensaver?
Use the DisplayRect property to change the size of the AVI file output window. You can use DisplayRect to cause your AVI file's output to stretch or shrink to a certain size. e.g. You want that the AVI file take's up the whole area of Panel1 :
Mediaplayer1.DisplayRect := Rect(0,0,Panel1.Width, Panel1.Height);

So when the user presses a button :

procedure Form1.Button1Click(Sender:TObject);
begin
 if OpenDialog1.Execute then begin
   MediaPlayer1.FileName := OpenDialog1.FileName;
   MediaPlayer1.Open;
   MediaPlayer1.DisplayRect := Rect(0, 0, Panel1.Width, Panel1.Height);
 end;
end;

Have fun watchin the movie!
c.u. ZifNab;

0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1347866
Hi jexd99,
forgot to tell you something:
Change the MediaPlayer1.Display property to panel1. (Put a Panel1 and MediaPlayer1 on a form). You can choose panel1 for display after you've put the panel1 on the form.
Have fun!
c.U. ZifNab;
0
 

Author Comment

by:jexd99
ID: 1347867
Thanks Zif!
I actually got the previous screensaver done and working, but
it took me alot longer than I planned! :)  I am trying to experiment with the media player because I haven't messed around with it much yet. I was looking at the display property with a panel trying to get it to work, but the key is the "displayrect".
I was soooooooo close! :)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month13 days, 4 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question