如何控制MediaPlayer按钮的Enabled?(50分)

  • 主题发起人 主题发起人 gzlcl
  • 开始时间 开始时间
它都是自动控制的,难道不好吗?
 
实在要控制看它自己的例子:

The following code causes all of the buttons of MediaPlayer1
to become disabled when a bitmap button is clicked:

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
with MediaPlayer1 do begin
AutoEnable := False;
EnabledButtons := [];
end;
end;
 
看看Help:
Determines which buttons on the media player are usable.

type

TMPBtnType = (btPlay, btPause, btStop, btNext, btPrev, btStep, btBack, btRecord, btEject);
TButtonSet = set of TMPBtnType;

property EnabledButtons: TButtonSet;

Description

EnabledButtons controls which buttons on the media player are enabled
and usable.

An enabled button is colored and usable. A disabled button is dimmed
and not usable. If a button is not enabled with EnabledButtons, it
is disabled. By default, all buttons are enabled.
 
谢谢两位的指点!
 
后退
顶部