如何控制多媒体窗口的大小(100分)

X

xzg163

Unregistered / Unconfirmed
GUEST, unregistred user!
小弟在用MEDIAPLAYER控件进行放映VCD,
但播放的窗口只是默认的大小,或者在播放时用鼠标拉动才改变大小。
我主要是想直接在程序中控制播放窗口,甚至使之全屏播放,请各位
高手指教。
 
Specifies a rectangular area in the control specified by the Display property that is used to display output from a multimedia device.

property DisplayRect: TRect;

Description

To display output in a specific rectangle area on a form assign a TRect record to DisplayRect. The Rect function can be used to create a TRect record.

Media that use a rectangle to display output usually perform best if the default DisplayRect size is used. To set DisplayRect to the default size, position the rectangle in the upper left corner and use 0, 0 for the lower right corner.

DisplayRect is ignored if Display is nil.

Examples of multimedia devices that use a window to display output are Animation, AVI Video, Digital Video, Overlay, and VCR.

Note: DisplayRect can be set only after the media device is opened.
 
使用TMediaplayer.DisplayRect属性
 
我也知道displayrec这东西的,但是当我修改displayrec.left
displayrec.right 等属性时,连COMPILE都不行,不信,各位仁兄
动手试试。
 
应该这样赋值

var
r:TRect;
begin

r.Left:=0;
r.Right:=100;
r.Top:=0;
r.Bottom:=100;
m.DisplayRect:=r;
 
我用Panel控件显示图象,
Panel大小改变时,
如下操作。这是C++BUILDER程序,Delphi雷同
Panel怎么变不用说吧。

void __fastcall TForm1::panel1Resize(TObject *Sender)
{
MediaPlayer1->DisplayRect=Panel1->BoundsRect;
}
 
我试了PIPI的赋值方法,可以编译,但仍然没有变化,窗口依旧。
我感觉是否要用到WINAPI之类的操作。尤其是全屏时,要把图标
隐含,把窗口的标题栏(显示CAPTION的地方)隐含才可以做到。

在这之前,我也试着把试评输出到PANEL,调整PANEL的大小,但
图象大小依旧。我用的方法是:
Mediaplayer1.display:=panel;
然后修改PANEL 的大小的。至于用C++BUILDER我倒没有试过。我想也差不多吧?!
 
谢谢各位兄弟了,现把分数分配给大家,
也许是因为我的DEPHI4不正规的缘故,后来该装DELPHI5后,一切就可以。
再次,再次谢谢大家了
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
920
DelphiTeacher的专栏
D
顶部