Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

TMediaPlayer position AVI centered within a TPanel?

Posted on 1998-10-21
5
Medium Priority
?
789 Views
Last Modified: 2012-05-04
Using Delphi 1... I am wondering if it is possible to center a AVI multimedia file within a TPanel component?  For example, if I set the Display property of a TMediaPlayer component to a TPanel like the following :

MediaPlayer1.Display := Panel1;

...how can I position a loaded AVI file within the TPanel perfectly centered?  It would be nice if the TPanel would resize automatically based upon the height and width of the AVI, just like the TBitmap.Autosize := True.

Thanks.
0
Comment
Question by:Kapusta
[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
  • 3
  • 2
5 Comments
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 240 total points
ID: 1343832
Use the DisplayRect property of the TMediaPlayer.
0
 

Author Comment

by:Kapusta
ID: 1343833
How does DisplayRect allow me to CENTER JUSTIFY the AVI if I don't know the dimensions (H x W) of the AVI being loaded?
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1343834
Becase DisplayRect is set to the default size when the device is opened. So you can open it - see how big it is going to be and adjust the top and left properties of the rectangle to center it...
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1343835
oops

. and then play the AVI when you have adjusted DIsplayRect.

Cheers,

Raymond.
0
 

Author Comment

by:Kapusta
ID: 1343836
Thanks!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
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…
Suggested Courses

721 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