0
点赞
收藏
分享

微信扫一扫

AxWindowsMediaPlayer控件的使用方法


axWindowsMediaPlayer1.Play          播放  
axWindowsMediaPlayer1.Stop          停止
axWindowsMediaPlayer1.Pause          暂停
axWindowsMediaPlayer1.PlayCount        文件播放次数
axWindowsMediaPlayer1.AutoRewind       是否循环播放
axWindowsMediaPlayer1.Balance         声道
axWindowsMediaPlayer1.Volume         音量
axWindowsMediaPlayer1.Mute          静音
axWindowsMediaPlayer1.EnableContextMenu    是否允许在控件上点击鼠标右键时弹出快捷菜单
axWindowsMediaPlayer1.AnimationAtStart    是否在播放前先播放动画
axWindowsMediaPlayer1.ShowControls      是否显示控件工具栏
axWindowsMediaPlayer1.ShowAudioControls    是否显示声音控制按钮
axWindowsMediaPlayer1.ShowDisplay       是否显示数据文件的相关信息
axWindowsMediaPlayer1.ShowGotoBar       是否显示Goto栏
axWindowsMediaPlayer1.ShowPositionControls  是否显示位置调节按钮
axWindowsMediaPlayer1.ShowStatusBar      是否显示状态栏
axWindowsMediaPlayer1.ShowTracker       是否显示进度条
axWindowsMediaPlayer1.FastForward       快进
axWindowsMediaPlayer1.FastReverse       快退
axWindowsMediaPlayer1.Rate          快进/快退速率
axWindowsMediaPlayer1.AllowChangeDisplaySize 是否允许自由设置播放图象大小
axWindowsMediaPlayer1.DisplaySize       设置播放图象大小
    1-MpDefaultSize         原始大小
    2-MpHalfSize           原始大小的一半
    3-MpDoubleSize          原始大小的两倍
    4-MpFullScreen          全屏
    5-MpOneSixteenthScreen      屏幕大小的1/16
    6-MpOneFourthScreen       屏幕大小的1/4
    7-MpOneHalfScreen        屏幕大小的1/2
axWindowsMediaPlayer1.ClickToPlay       是否允许单击播放窗口启动Media Player 在视频播放之后,可以通过如下方式读取源视频的宽度和高度,然后设置其还原为原始的大小.
private void ResizeOriginal()
{
int intWidth = axWindowsMediaPlayer1.currentMedia.imageSourceWidth;
int intHeight = axWindowsMediaPlayer1.currentMedia.imageSourceHeight;
axWindowsMediaPlayer1.Width = intWidth + 2;
axWindowsMediaPlayer1.Height = intHeight + 2;
}

举报

相关推荐

0 条评论