Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Screen size on media component

Posted on 1997-10-17
3
Medium Priority
?
200 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

597 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