@APlayer管理员:
vb.net中 ”mAPlayer.GetConfig(20%)“ 与“”mAPlayer.GetConfig(20)“效果是一样的,,,"20%"表示的是20的Integer型,我修改成"mAPlayer.GetConfig(20)"试了,还是返回”0“,昨天vb.net的调用过程未发出来:
Public Function DoTVPlay_ByAPlayer(ByVal OwnerHwnd As System.Object, ByVal FileName As String) As Integer
If mAPlayer IsNot Nothing Then
mAPlayer.Close()
mAPlayer = Nothing
End If
Dim picRQMovie2 As PictureBox = OwnerHwnd
mAPlayer = New APlayer3Lib.Player '编译目标平台 必需设置成X86 ,代表32位, 否则这句出错, 不能成功建立对象
mAPlayer.Open(FileName)
Dim hwdAPlayer As Int32 = (-1)
Dim pstrResult As String = "", intResult As Int32 = 0
intResult = mAPlayer.GetVideoWidth()
'Debug.Print(picRQMovie2.Handle.ToString)
'intResult = mAPlayer.SetConfig(20, picRQMovie2.Handle.ToString)
pstrResult = mAPlayer.GetConfig(20)
hwdAPlayer = CType(pstrResult, Integer) 'get Video WINDOW handle
'mAPlayer.SetPosition(picRQMovie2.Handle.ToInt32) //设置播放节目位置:播放时间点!,而不是播放窗口的位置
'mAPlayer.SetPosition(0)
mAPlayer.Play()
'System.Threading.Thread.Sleep(360)
Debug.Print(mAPlayer.GetState.ToString)
End Function